LLToken.h 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514
  1. #pragma once
  2. #ifdef __GNUC__
  3. #pragma GCC diagnostic push
  4. #pragma GCC diagnostic ignored "-Wunused-parameter"
  5. #endif
  6. //===- LLToken.h - Token Codes for LLVM Assembly Files ----------*- C++ -*-===//
  7. //
  8. // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
  9. // See https://llvm.org/LICENSE.txt for license information.
  10. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  11. //
  12. //===----------------------------------------------------------------------===//
  13. //
  14. // This file defines the enums for the .ll lexer.
  15. //
  16. //===----------------------------------------------------------------------===//
  17. #ifndef LLVM_ASMPARSER_LLTOKEN_H
  18. #define LLVM_ASMPARSER_LLTOKEN_H
  19. namespace llvm {
  20. namespace lltok {
  21. enum Kind {
  22. // Markers
  23. Eof,
  24. Error,
  25. // Tokens with no info.
  26. dotdotdot, // ...
  27. equal,
  28. comma, // = ,
  29. star, // *
  30. lsquare,
  31. rsquare, // [ ]
  32. lbrace,
  33. rbrace, // { }
  34. less,
  35. greater, // < >
  36. lparen,
  37. rparen, // ( )
  38. exclaim, // !
  39. bar, // |
  40. colon, // :
  41. kw_vscale,
  42. kw_x,
  43. kw_true,
  44. kw_false,
  45. kw_declare,
  46. kw_define,
  47. kw_global,
  48. kw_constant,
  49. kw_dso_local,
  50. kw_dso_preemptable,
  51. kw_private,
  52. kw_internal,
  53. kw_linkonce,
  54. kw_linkonce_odr,
  55. kw_weak, // Used as a linkage, and a modifier for "cmpxchg".
  56. kw_weak_odr,
  57. kw_appending,
  58. kw_dllimport,
  59. kw_dllexport,
  60. kw_common,
  61. kw_available_externally,
  62. kw_default,
  63. kw_hidden,
  64. kw_protected,
  65. kw_unnamed_addr,
  66. kw_local_unnamed_addr,
  67. kw_externally_initialized,
  68. kw_extern_weak,
  69. kw_external,
  70. kw_thread_local,
  71. kw_localdynamic,
  72. kw_initialexec,
  73. kw_localexec,
  74. kw_zeroinitializer,
  75. kw_undef,
  76. kw_poison,
  77. kw_null,
  78. kw_none,
  79. kw_to,
  80. kw_caller,
  81. kw_within,
  82. kw_from,
  83. kw_tail,
  84. kw_musttail,
  85. kw_notail,
  86. kw_target,
  87. kw_triple,
  88. kw_source_filename,
  89. kw_unwind,
  90. kw_deplibs, // FIXME: Remove in 4.0
  91. kw_datalayout,
  92. kw_volatile,
  93. kw_atomic,
  94. kw_unordered,
  95. kw_monotonic,
  96. kw_acquire,
  97. kw_release,
  98. kw_acq_rel,
  99. kw_seq_cst,
  100. kw_syncscope,
  101. kw_nnan,
  102. kw_ninf,
  103. kw_nsz,
  104. kw_arcp,
  105. kw_contract,
  106. kw_reassoc,
  107. kw_afn,
  108. kw_fast,
  109. kw_nuw,
  110. kw_nsw,
  111. kw_exact,
  112. kw_inbounds,
  113. kw_inrange,
  114. kw_align,
  115. kw_addrspace,
  116. kw_section,
  117. kw_partition,
  118. kw_alias,
  119. kw_ifunc,
  120. kw_module,
  121. kw_asm,
  122. kw_sideeffect,
  123. kw_alignstack,
  124. kw_inteldialect,
  125. kw_gc,
  126. kw_prefix,
  127. kw_prologue,
  128. kw_c,
  129. kw_cc,
  130. kw_ccc,
  131. kw_fastcc,
  132. kw_coldcc,
  133. kw_intel_ocl_bicc,
  134. kw_cfguard_checkcc,
  135. kw_x86_stdcallcc,
  136. kw_x86_fastcallcc,
  137. kw_x86_thiscallcc,
  138. kw_x86_vectorcallcc,
  139. kw_x86_regcallcc,
  140. kw_arm_apcscc,
  141. kw_arm_aapcscc,
  142. kw_arm_aapcs_vfpcc,
  143. kw_aarch64_vector_pcs,
  144. kw_aarch64_sve_vector_pcs,
  145. kw_msp430_intrcc,
  146. kw_avr_intrcc,
  147. kw_avr_signalcc,
  148. kw_ptx_kernel,
  149. kw_ptx_device,
  150. kw_spir_kernel,
  151. kw_spir_func,
  152. kw_x86_64_sysvcc,
  153. kw_win64cc,
  154. kw_webkit_jscc,
  155. kw_anyregcc,
  156. kw_swiftcc,
  157. kw_swifttailcc,
  158. kw_preserve_mostcc,
  159. kw_preserve_allcc,
  160. kw_ghccc,
  161. kw_x86_intrcc,
  162. kw_hhvmcc,
  163. kw_hhvm_ccc,
  164. kw_cxx_fast_tlscc,
  165. kw_amdgpu_vs,
  166. kw_amdgpu_ls,
  167. kw_amdgpu_hs,
  168. kw_amdgpu_es,
  169. kw_amdgpu_gs,
  170. kw_amdgpu_ps,
  171. kw_amdgpu_cs,
  172. kw_amdgpu_kernel,
  173. kw_amdgpu_gfx,
  174. kw_tailcc,
  175. // Attributes:
  176. kw_attributes,
  177. kw_allocsize,
  178. kw_alwaysinline,
  179. kw_argmemonly,
  180. kw_sanitize_address,
  181. kw_sanitize_hwaddress,
  182. kw_sanitize_memtag,
  183. kw_builtin,
  184. kw_byval,
  185. kw_inalloca,
  186. kw_cold,
  187. kw_convergent,
  188. kw_dereferenceable,
  189. kw_dereferenceable_or_null,
  190. kw_disable_sanitizer_instrumentation,
  191. kw_elementtype,
  192. kw_inaccessiblememonly,
  193. kw_inaccessiblemem_or_argmemonly,
  194. kw_inlinehint,
  195. kw_inreg,
  196. kw_jumptable,
  197. kw_minsize,
  198. kw_naked,
  199. kw_nest,
  200. kw_noalias,
  201. kw_noundef,
  202. kw_nobuiltin,
  203. kw_nocallback,
  204. kw_nocapture,
  205. kw_noduplicate,
  206. kw_nofree,
  207. kw_noimplicitfloat,
  208. kw_noinline,
  209. kw_norecurse,
  210. kw_nonlazybind,
  211. kw_nomerge,
  212. kw_nonnull,
  213. kw_noprofile,
  214. kw_noredzone,
  215. kw_noreturn,
  216. kw_nosync,
  217. kw_nocf_check,
  218. kw_nounwind,
  219. kw_nosanitize_coverage,
  220. kw_null_pointer_is_valid,
  221. kw_optforfuzzing,
  222. kw_optnone,
  223. kw_optsize,
  224. kw_preallocated,
  225. kw_readnone,
  226. kw_readonly,
  227. kw_returned,
  228. kw_returns_twice,
  229. kw_signext,
  230. kw_speculatable,
  231. kw_ssp,
  232. kw_sspreq,
  233. kw_sspstrong,
  234. kw_safestack,
  235. kw_shadowcallstack,
  236. kw_sret,
  237. kw_sanitize_thread,
  238. kw_sanitize_memory,
  239. kw_speculative_load_hardening,
  240. kw_strictfp,
  241. kw_swifterror,
  242. kw_swiftself,
  243. kw_swiftasync,
  244. kw_uwtable,
  245. kw_vscale_range,
  246. kw_willreturn,
  247. kw_writeonly,
  248. kw_zeroext,
  249. kw_immarg,
  250. kw_byref,
  251. kw_mustprogress,
  252. kw_type,
  253. kw_opaque,
  254. kw_comdat,
  255. // Comdat types
  256. kw_any,
  257. kw_exactmatch,
  258. kw_largest,
  259. kw_nodeduplicate,
  260. kw_samesize,
  261. kw_eq,
  262. kw_ne,
  263. kw_slt,
  264. kw_sgt,
  265. kw_sle,
  266. kw_sge,
  267. kw_ult,
  268. kw_ugt,
  269. kw_ule,
  270. kw_uge,
  271. kw_oeq,
  272. kw_one,
  273. kw_olt,
  274. kw_ogt,
  275. kw_ole,
  276. kw_oge,
  277. kw_ord,
  278. kw_uno,
  279. kw_ueq,
  280. kw_une,
  281. // atomicrmw operations that aren't also instruction keywords.
  282. kw_xchg,
  283. kw_nand,
  284. kw_max,
  285. kw_min,
  286. kw_umax,
  287. kw_umin,
  288. // Instruction Opcodes (Opcode in UIntVal).
  289. kw_fneg,
  290. kw_add,
  291. kw_fadd,
  292. kw_sub,
  293. kw_fsub,
  294. kw_mul,
  295. kw_fmul,
  296. kw_udiv,
  297. kw_sdiv,
  298. kw_fdiv,
  299. kw_urem,
  300. kw_srem,
  301. kw_frem,
  302. kw_shl,
  303. kw_lshr,
  304. kw_ashr,
  305. kw_and,
  306. kw_or,
  307. kw_xor,
  308. kw_icmp,
  309. kw_fcmp,
  310. kw_phi,
  311. kw_call,
  312. kw_trunc,
  313. kw_zext,
  314. kw_sext,
  315. kw_fptrunc,
  316. kw_fpext,
  317. kw_uitofp,
  318. kw_sitofp,
  319. kw_fptoui,
  320. kw_fptosi,
  321. kw_inttoptr,
  322. kw_ptrtoint,
  323. kw_bitcast,
  324. kw_addrspacecast,
  325. kw_select,
  326. kw_va_arg,
  327. kw_landingpad,
  328. kw_personality,
  329. kw_cleanup,
  330. kw_catch,
  331. kw_filter,
  332. kw_ret,
  333. kw_br,
  334. kw_switch,
  335. kw_indirectbr,
  336. kw_invoke,
  337. kw_resume,
  338. kw_unreachable,
  339. kw_cleanupret,
  340. kw_catchswitch,
  341. kw_catchret,
  342. kw_catchpad,
  343. kw_cleanuppad,
  344. kw_callbr,
  345. kw_alloca,
  346. kw_load,
  347. kw_store,
  348. kw_fence,
  349. kw_cmpxchg,
  350. kw_atomicrmw,
  351. kw_getelementptr,
  352. kw_extractelement,
  353. kw_insertelement,
  354. kw_shufflevector,
  355. kw_extractvalue,
  356. kw_insertvalue,
  357. kw_blockaddress,
  358. kw_dso_local_equivalent,
  359. kw_no_cfi,
  360. kw_freeze,
  361. // Metadata types.
  362. kw_distinct,
  363. // Use-list order directives.
  364. kw_uselistorder,
  365. kw_uselistorder_bb,
  366. // Summary index keywords
  367. kw_path,
  368. kw_hash,
  369. kw_gv,
  370. kw_guid,
  371. kw_name,
  372. kw_summaries,
  373. kw_flags,
  374. kw_blockcount,
  375. kw_linkage,
  376. kw_visibility,
  377. kw_notEligibleToImport,
  378. kw_live,
  379. kw_dsoLocal,
  380. kw_canAutoHide,
  381. kw_function,
  382. kw_insts,
  383. kw_funcFlags,
  384. kw_readNone,
  385. kw_readOnly,
  386. kw_noRecurse,
  387. kw_returnDoesNotAlias,
  388. kw_noInline,
  389. kw_alwaysInline,
  390. kw_noUnwind,
  391. kw_mayThrow,
  392. kw_hasUnknownCall,
  393. kw_mustBeUnreachable,
  394. kw_calls,
  395. kw_callee,
  396. kw_params,
  397. kw_param,
  398. kw_hotness,
  399. kw_unknown,
  400. kw_hot,
  401. kw_critical,
  402. kw_relbf,
  403. kw_variable,
  404. kw_vTableFuncs,
  405. kw_virtFunc,
  406. kw_aliasee,
  407. kw_refs,
  408. kw_typeIdInfo,
  409. kw_typeTests,
  410. kw_typeTestAssumeVCalls,
  411. kw_typeCheckedLoadVCalls,
  412. kw_typeTestAssumeConstVCalls,
  413. kw_typeCheckedLoadConstVCalls,
  414. kw_vFuncId,
  415. kw_offset,
  416. kw_args,
  417. kw_typeid,
  418. kw_typeidCompatibleVTable,
  419. kw_summary,
  420. kw_typeTestRes,
  421. kw_kind,
  422. kw_unsat,
  423. kw_byteArray,
  424. kw_inline,
  425. kw_single,
  426. kw_allOnes,
  427. kw_sizeM1BitWidth,
  428. kw_alignLog2,
  429. kw_sizeM1,
  430. kw_bitMask,
  431. kw_inlineBits,
  432. kw_vcall_visibility,
  433. kw_wpdResolutions,
  434. kw_wpdRes,
  435. kw_indir,
  436. kw_singleImpl,
  437. kw_branchFunnel,
  438. kw_singleImplName,
  439. kw_resByArg,
  440. kw_byArg,
  441. kw_uniformRetVal,
  442. kw_uniqueRetVal,
  443. kw_virtualConstProp,
  444. kw_info,
  445. kw_byte,
  446. kw_bit,
  447. kw_varFlags,
  448. // Unsigned Valued tokens (UIntVal).
  449. LabelID, // 42:
  450. GlobalID, // @42
  451. LocalVarID, // %42
  452. AttrGrpID, // #42
  453. SummaryID, // ^42
  454. // String valued tokens (StrVal).
  455. LabelStr, // foo:
  456. GlobalVar, // @foo @"foo"
  457. ComdatVar, // $foo
  458. LocalVar, // %foo %"foo"
  459. MetadataVar, // !foo
  460. StringConstant, // "foo"
  461. DwarfTag, // DW_TAG_foo
  462. DwarfAttEncoding, // DW_ATE_foo
  463. DwarfVirtuality, // DW_VIRTUALITY_foo
  464. DwarfLang, // DW_LANG_foo
  465. DwarfCC, // DW_CC_foo
  466. EmissionKind, // lineTablesOnly
  467. NameTableKind, // GNU
  468. DwarfOp, // DW_OP_foo
  469. DIFlag, // DIFlagFoo
  470. DISPFlag, // DISPFlagFoo
  471. DwarfMacinfo, // DW_MACINFO_foo
  472. ChecksumKind, // CSK_foo
  473. // Type valued tokens (TyVal).
  474. Type,
  475. APFloat, // APFloatVal
  476. APSInt // APSInt
  477. };
  478. } // end namespace lltok
  479. } // end namespace llvm
  480. #endif
  481. #ifdef __GNUC__
  482. #pragma GCC diagnostic pop
  483. #endif