1 //===- LLToken.h - Token Codes for LLVM Assembly Files ----------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This file defines the enums for the .ll lexer.
12 //===----------------------------------------------------------------------===//
14 #ifndef LIBS_ASMPARSER_LLTOKEN_H
15 #define LIBS_ASMPARSER_LLTOKEN_H
23 // Tokens with no info.
27 lsquare, rsquare, // [ ]
28 lbrace, rbrace, // { }
30 lparen, rparen, // ( )
31 backslash, // \ (not /)
37 kw_declare, kw_define,
38 kw_global, kw_constant,
42 kw_linker_private, // NOTE: deprecated, for parser compatibility
43 kw_linker_private_weak, // NOTE: deprecated, for parser compatibility
44 kw_linkonce, kw_linkonce_odr,
45 kw_weak, kw_weak_odr, kw_appending,
46 kw_dllimport, kw_dllexport, kw_common, kw_available_externally,
47 kw_default, kw_hidden, kw_protected,
49 kw_externally_initialized,
51 kw_external, kw_thread_local,
52 kw_localdynamic, kw_initialexec, kw_localexec,
61 kw_deplibs, // FIXME: Remove in 4.0
65 kw_unordered, kw_monotonic, kw_acquire, kw_release, kw_acq_rel, kw_seq_cst,
89 kw_cc, kw_ccc, kw_fastcc, kw_coldcc,
91 kw_x86_stdcallcc, kw_x86_fastcallcc, kw_x86_thiscallcc, kw_x86_cdeclmethodcc,
92 kw_arm_apcscc, kw_arm_aapcscc, kw_arm_aapcs_vfpcc,
94 kw_ptx_kernel, kw_ptx_device,
95 kw_spir_kernel, kw_spir_func,
96 kw_x86_64_sysvcc, kw_x86_64_win64cc,
97 kw_webkit_jscc, kw_anyregcc,
98 kw_preserve_mostcc, kw_preserve_allcc,
142 kw_eq, kw_ne, kw_slt, kw_sgt, kw_sle, kw_sge, kw_ult, kw_ugt, kw_ule,
143 kw_uge, kw_oeq, kw_one, kw_olt, kw_ogt, kw_ole, kw_oge, kw_ord, kw_uno,
146 // atomicrmw operations that aren't also instruction keywords.
147 kw_xchg, kw_nand, kw_max, kw_min, kw_umax, kw_umin,
149 // Instruction Opcodes (Opcode in UIntVal).
150 kw_add, kw_fadd, kw_sub, kw_fsub, kw_mul, kw_fmul,
151 kw_udiv, kw_sdiv, kw_fdiv,
152 kw_urem, kw_srem, kw_frem, kw_shl, kw_lshr, kw_ashr,
153 kw_and, kw_or, kw_xor, kw_icmp, kw_fcmp,
156 kw_trunc, kw_zext, kw_sext, kw_fptrunc, kw_fpext, kw_uitofp, kw_sitofp,
157 kw_fptoui, kw_fptosi, kw_inttoptr, kw_ptrtoint, kw_bitcast,
159 kw_select, kw_va_arg,
161 kw_landingpad, kw_personality, kw_cleanup, kw_catch, kw_filter,
163 kw_ret, kw_br, kw_switch, kw_indirectbr, kw_invoke, kw_resume,
166 kw_alloca, kw_load, kw_store, kw_fence, kw_cmpxchg, kw_atomicrmw,
169 kw_extractelement, kw_insertelement, kw_shufflevector,
170 kw_extractvalue, kw_insertvalue, kw_blockaddress,
172 // Unsigned Valued tokens (UIntVal).
177 // String valued tokens (StrVal).
179 GlobalVar, // @foo @"foo"
180 LocalVar, // %foo %"foo"
182 StringConstant, // "foo"
184 // Type valued tokens (TyVal).
187 APFloat, // APFloatVal
190 } // end namespace lltok
191 } // end namespace llvm