stub-objc.c 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472
  1. /* Stub functions for Objective-C and Objective-C++ routines
  2. that are called from within the C and C++ front-ends,
  3. respectively.
  4. Copyright (C) 1991-2015 Free Software Foundation, Inc.
  5. This file is part of GCC.
  6. GCC is free software; you can redistribute it and/or modify it under
  7. the terms of the GNU General Public License as published by the Free
  8. Software Foundation; either version 3, or (at your option) any later
  9. version.
  10. GCC is distributed in the hope that it will be useful, but WITHOUT ANY
  11. WARRANTY; without even the implied warranty of MERCHANTABILITY or
  12. FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
  13. for more details.
  14. You should have received a copy of the GNU General Public License
  15. along with GCC; see the file COPYING3. If not see
  16. <http://www.gnu.org/licenses/>. */
  17. #include "config.h"
  18. #include "system.h"
  19. #include "coretypes.h"
  20. #include "vec.h"
  21. #include "hash-set.h"
  22. #include "machmode.h"
  23. #include "alias.h"
  24. #include "input.h"
  25. #include "symtab.h"
  26. #include "double-int.h"
  27. #include "flags.h"
  28. #include "inchash.h"
  29. #include "tree.h"
  30. #include "c-common.h"
  31. #include "c-objc.h"
  32. tree
  33. objc_is_class_name (tree ARG_UNUSED (arg))
  34. {
  35. return 0;
  36. }
  37. tree
  38. objc_is_id (tree ARG_UNUSED (arg))
  39. {
  40. return 0;
  41. }
  42. tree
  43. objc_is_object_ptr (tree ARG_UNUSED (arg))
  44. {
  45. return 0;
  46. }
  47. bool objc_diagnose_private_ivar (tree ARG_UNUSED (arg))
  48. {
  49. return false;
  50. }
  51. tree
  52. objc_lookup_ivar (tree other, tree ARG_UNUSED (arg))
  53. {
  54. /* Just use whatever C/C++ found. */
  55. return other;
  56. }
  57. void
  58. objc_check_decl (tree ARG_UNUSED (decl))
  59. {
  60. }
  61. void
  62. objc_check_global_decl (tree ARG_UNUSED (decl))
  63. {
  64. }
  65. tree
  66. objc_common_type (tree ARG_UNUSED (type1), tree ARG_UNUSED (type2))
  67. {
  68. return 0;
  69. }
  70. bool
  71. objc_compare_types (tree ARG_UNUSED (ltyp), tree ARG_UNUSED (rtyp),
  72. int ARG_UNUSED (argno), tree ARG_UNUSED (callee))
  73. {
  74. return false;
  75. }
  76. bool
  77. objc_have_common_type (tree ARG_UNUSED (ltyp), tree ARG_UNUSED (rtyp),
  78. int ARG_UNUSED (argno), tree ARG_UNUSED (callee))
  79. {
  80. return false;
  81. }
  82. void
  83. objc_volatilize_decl (tree ARG_UNUSED (decl))
  84. {
  85. }
  86. tree
  87. objc_rewrite_function_call (tree function, tree ARG_UNUSED (first_param))
  88. {
  89. return function;
  90. }
  91. tree
  92. objc_message_selector (void)
  93. {
  94. return 0;
  95. }
  96. void
  97. objc_declare_alias (tree ARG_UNUSED (alias), tree ARG_UNUSED (orig))
  98. {
  99. }
  100. void
  101. objc_declare_class (tree ARG_UNUSED (identifier))
  102. {
  103. }
  104. void
  105. objc_declare_protocol (tree ARG_UNUSED (name), tree ARG_UNUSED (attributes))
  106. {
  107. }
  108. void
  109. objc_start_protocol (tree ARG_UNUSED (proto),
  110. tree ARG_UNUSED (protorefs),
  111. tree ARG_UNUSED (attribs))
  112. {
  113. }
  114. void
  115. objc_set_method_opt (bool ARG_UNUSED (optional))
  116. {
  117. }
  118. void
  119. objc_start_class_interface (tree ARG_UNUSED (name),
  120. tree ARG_UNUSED (super),
  121. tree ARG_UNUSED (protos),
  122. tree ARG_UNUSED (attribs))
  123. {
  124. }
  125. void
  126. objc_start_category_interface (tree ARG_UNUSED (name),
  127. tree ARG_UNUSED (categ),
  128. tree ARG_UNUSED (protos),
  129. tree ARG_UNUSED (attribs))
  130. {
  131. }
  132. void
  133. objc_continue_interface (void)
  134. {
  135. }
  136. void
  137. objc_finish_interface (void)
  138. {
  139. }
  140. void
  141. objc_add_instance_variable (tree ARG_UNUSED (decl))
  142. {
  143. }
  144. void
  145. objc_set_visibility (objc_ivar_visibility_kind ARG_UNUSED (vis))
  146. {
  147. }
  148. void
  149. objc_start_class_implementation (tree ARG_UNUSED (name),
  150. tree ARG_UNUSED (super))
  151. {
  152. }
  153. void
  154. objc_start_category_implementation (tree ARG_UNUSED (name),
  155. tree ARG_UNUSED (categ))
  156. {
  157. }
  158. void
  159. objc_continue_implementation (void)
  160. {
  161. }
  162. void
  163. objc_clear_super_receiver (void)
  164. {
  165. }
  166. void
  167. objc_finish_implementation (void)
  168. {
  169. }
  170. void
  171. objc_add_method_declaration (bool ARG_UNUSED (is_class_method),
  172. tree ARG_UNUSED (signature),
  173. tree ARG_UNUSED (attributes))
  174. {
  175. }
  176. bool
  177. objc_start_method_definition (bool ARG_UNUSED (is_class_method),
  178. tree ARG_UNUSED (signature),
  179. tree ARG_UNUSED (attributes),
  180. tree ARG_UNUSED (expr))
  181. {
  182. return true;
  183. }
  184. void
  185. objc_finish_method_definition (tree ARG_UNUSED (fndecl))
  186. {
  187. }
  188. bool
  189. objc_method_decl (enum tree_code ARG_UNUSED(opcode))
  190. {
  191. return false;
  192. }
  193. tree
  194. objc_build_keyword_decl (tree ARG_UNUSED (selector),
  195. tree ARG_UNUSED (type),
  196. tree ARG_UNUSED (identifier),
  197. tree ARG_UNUSED (attributes))
  198. {
  199. return 0;
  200. }
  201. tree
  202. objc_build_method_signature (bool ARG_UNUSED (is_class_method),
  203. tree ARG_UNUSED (rettype),
  204. tree ARG_UNUSED (selectors),
  205. tree ARG_UNUSED (optparms),
  206. bool ARG_UNUSED (ellipsis))
  207. {
  208. return 0;
  209. }
  210. tree
  211. objc_build_encode_expr (tree ARG_UNUSED (expr))
  212. {
  213. return 0;
  214. }
  215. tree
  216. objc_build_protocol_expr (tree ARG_UNUSED (expr))
  217. {
  218. return 0;
  219. }
  220. tree
  221. objc_build_selector_expr (location_t ARG_UNUSED (loc), tree ARG_UNUSED (expr))
  222. {
  223. return 0;
  224. }
  225. tree
  226. objc_build_message_expr (tree ARG_UNUSED (receiver), tree ARG_UNUSED (args))
  227. {
  228. return 0;
  229. }
  230. tree
  231. objc_build_string_object (tree ARG_UNUSED (str))
  232. {
  233. return 0;
  234. }
  235. tree
  236. objc_get_class_reference (tree ARG_UNUSED (name))
  237. {
  238. return 0;
  239. }
  240. bool
  241. objc_detect_field_duplicates (bool ARG_UNUSED (check_superclasses_only))
  242. {
  243. return false;
  244. }
  245. tree
  246. objc_get_protocol_qualified_type (tree ARG_UNUSED (name),
  247. tree ARG_UNUSED (protos))
  248. {
  249. return 0;
  250. }
  251. int
  252. objc_static_init_needed_p (void)
  253. {
  254. return 0;
  255. }
  256. tree
  257. objc_generate_static_init_call (tree ARG_UNUSED (ctors))
  258. {
  259. return 0;
  260. }
  261. int
  262. objc_is_public (tree ARG_UNUSED (expr), tree ARG_UNUSED (identifier))
  263. {
  264. return 1;
  265. }
  266. tree
  267. objc_get_class_ivars (tree ARG_UNUSED (name))
  268. {
  269. return 0;
  270. }
  271. void
  272. objc_add_property_declaration (location_t ARG_UNUSED (location),
  273. tree ARG_UNUSED (decl),
  274. bool ARG_UNUSED (parsed_property_readonly),
  275. bool ARG_UNUSED (parsed_property_readwrite),
  276. bool ARG_UNUSED (parsed_property_assign),
  277. bool ARG_UNUSED (parsed_property_retain),
  278. bool ARG_UNUSED (parsed_property_copy),
  279. bool ARG_UNUSED (parsed_property_nonatomic),
  280. tree ARG_UNUSED (parsed_property_getter_ident),
  281. tree ARG_UNUSED (parsed_property_setter_ident))
  282. {
  283. }
  284. bool
  285. objc_is_property_ref (tree ARG_UNUSED (node))
  286. {
  287. return 0;
  288. }
  289. tree
  290. objc_maybe_build_component_ref (tree ARG_UNUSED (datum), tree ARG_UNUSED (component))
  291. {
  292. return 0;
  293. }
  294. tree
  295. objc_build_class_component_ref (tree ARG_UNUSED (datum), tree ARG_UNUSED (component))
  296. {
  297. return 0;
  298. }
  299. tree
  300. objc_maybe_build_modify_expr (tree ARG_UNUSED (lhs), tree ARG_UNUSED (rhs))
  301. {
  302. return 0;
  303. }
  304. tree
  305. objc_build_incr_expr_for_property_ref (location_t ARG_UNUSED (location),
  306. enum tree_code ARG_UNUSED (code),
  307. tree ARG_UNUSED (argument),
  308. tree ARG_UNUSED (increment))
  309. {
  310. return 0;
  311. }
  312. void
  313. objc_add_synthesize_declaration (location_t ARG_UNUSED (start_locus),
  314. tree ARG_UNUSED (property_and_ivar_list))
  315. {
  316. }
  317. void
  318. objc_add_dynamic_declaration (location_t ARG_UNUSED (start_locus),
  319. tree ARG_UNUSED (property_list))
  320. {
  321. }
  322. const char *
  323. objc_maybe_printable_name (tree ARG_UNUSED (decl),
  324. int ARG_UNUSED (v))
  325. {
  326. return NULL;
  327. }
  328. tree
  329. objc_build_throw_stmt (location_t ARG_UNUSED (loc), tree ARG_UNUSED (expr))
  330. {
  331. return 0;
  332. }
  333. tree
  334. objc_build_synchronized (location_t ARG_UNUSED (start_locus),
  335. tree ARG_UNUSED (mutex), tree ARG_UNUSED (body))
  336. {
  337. return 0;
  338. }
  339. void
  340. objc_begin_try_stmt (location_t ARG_UNUSED (try_locus), tree ARG_UNUSED (body))
  341. {
  342. }
  343. void
  344. objc_begin_catch_clause (tree ARG_UNUSED (decl))
  345. {
  346. }
  347. void
  348. objc_finish_catch_clause (void)
  349. {
  350. }
  351. void
  352. objc_build_finally_clause (location_t ARG_UNUSED (finally_locus),
  353. tree ARG_UNUSED (body))
  354. {
  355. }
  356. tree
  357. objc_finish_try_stmt (void)
  358. {
  359. return 0;
  360. }
  361. tree
  362. objc_generate_write_barrier (tree ARG_UNUSED (lhs),
  363. enum tree_code ARG_UNUSED (modifycode),
  364. tree ARG_UNUSED (rhs))
  365. {
  366. return 0;
  367. }
  368. void
  369. objc_finish_foreach_loop (location_t ARG_UNUSED (location), tree ARG_UNUSED (object_expression),
  370. tree ARG_UNUSED (collection_expression), tree ARG_UNUSED (for_body),
  371. tree ARG_UNUSED (break_label), tree ARG_UNUSED (continue_label))
  372. {
  373. return;
  374. }
  375. void
  376. objc_write_global_declarations (void)
  377. {
  378. }
  379. bool
  380. objc_string_ref_type_p (tree ARG_UNUSED (strp))
  381. {
  382. return false;
  383. }
  384. void
  385. objc_check_format_arg (tree ARG_UNUSED (format_arg),
  386. tree ARG_UNUSED (args_list))
  387. {
  388. }
  389. void
  390. objc_finish_function (void)
  391. {
  392. }
  393. void
  394. objc_maybe_warn_exceptions (location_t ARG_UNUSED (loc))
  395. {
  396. }