[opaque pointers] Avoid the use of pointee types when parsing inline asm in IR
[oota-llvm.git] / lib / AsmParser / LLToken.h
1 //===- LLToken.h - Token Codes for LLVM Assembly Files ----------*- C++ -*-===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // This file defines the enums for the .ll lexer.
11 //
12 //===----------------------------------------------------------------------===//
13
14 #ifndef LLVM_LIB_ASMPARSER_LLTOKEN_H
15 #define LLVM_LIB_ASMPARSER_LLTOKEN_H
16
17 namespace llvm {
18 namespace lltok {
19   enum Kind {
20     // Markers
21     Eof, Error,
22
23     // Tokens with no info.
24     dotdotdot,         // ...
25     equal, comma,      // =  ,
26     star,              // *
27     lsquare, rsquare,  // [  ]
28     lbrace, rbrace,    // {  }
29     less, greater,     // <  >
30     lparen, rparen,    // (  )
31     exclaim,           // !
32     bar,               // |
33
34     kw_x,
35     kw_true,    kw_false,
36     kw_declare, kw_define,
37     kw_global,  kw_constant,
38
39     kw_private,
40     kw_internal,
41     kw_linkonce, kw_linkonce_odr,
42     kw_weak, // Used as a linkage, and a modifier for "cmpxchg".
43     kw_weak_odr, kw_appending,
44     kw_dllimport, kw_dllexport, kw_common, kw_available_externally,
45     kw_default, kw_hidden, kw_protected,
46     kw_unnamed_addr,
47     kw_externally_initialized,
48     kw_extern_weak,
49     kw_external, kw_thread_local,
50     kw_localdynamic, kw_initialexec, kw_localexec,
51     kw_zeroinitializer,
52     kw_undef, kw_null,
53     kw_to,
54     kw_tail,
55     kw_musttail,
56     kw_target,
57     kw_triple,
58     kw_unwind,
59     kw_deplibs,                 // FIXME: Remove in 4.0
60     kw_datalayout,
61     kw_volatile,
62     kw_atomic,
63     kw_unordered, kw_monotonic, kw_acquire, kw_release, kw_acq_rel, kw_seq_cst,
64     kw_singlethread,
65     kw_nnan,
66     kw_ninf,
67     kw_nsz,
68     kw_arcp,
69     kw_fast,
70     kw_nuw,
71     kw_nsw,
72     kw_exact,
73     kw_inbounds,
74     kw_align,
75     kw_addrspace,
76     kw_section,
77     kw_alias,
78     kw_module,
79     kw_asm,
80     kw_sideeffect,
81     kw_alignstack,
82     kw_inteldialect,
83     kw_gc,
84     kw_prefix,
85     kw_prologue,
86     kw_c,
87
88     kw_cc, kw_ccc, kw_fastcc, kw_coldcc,
89     kw_intel_ocl_bicc,
90     kw_x86_stdcallcc, kw_x86_fastcallcc, kw_x86_thiscallcc, kw_x86_vectorcallcc,
91     kw_arm_apcscc, kw_arm_aapcscc, kw_arm_aapcs_vfpcc,
92     kw_msp430_intrcc,
93     kw_ptx_kernel, kw_ptx_device,
94     kw_spir_kernel, kw_spir_func,
95     kw_x86_64_sysvcc, kw_x86_64_win64cc,
96     kw_webkit_jscc, kw_anyregcc,
97     kw_preserve_mostcc, kw_preserve_allcc,
98     kw_ghccc,
99
100     // Attributes:
101     kw_attributes,
102     kw_alwaysinline,
103     kw_argmemonly,
104     kw_sanitize_address,
105     kw_builtin,
106     kw_byval,
107     kw_inalloca,
108     kw_cold,
109     kw_convergent,
110     kw_dereferenceable,
111     kw_dereferenceable_or_null,
112     kw_inlinehint,
113     kw_inreg,
114     kw_jumptable,
115     kw_minsize,
116     kw_naked,
117     kw_nest,
118     kw_noalias,
119     kw_nobuiltin,
120     kw_nocapture,
121     kw_noduplicate,
122     kw_noimplicitfloat,
123     kw_noinline,
124     kw_nonlazybind,
125     kw_nonnull,
126     kw_noredzone,
127     kw_noreturn,
128     kw_nounwind,
129     kw_optnone,
130     kw_optsize,
131     kw_readnone,
132     kw_readonly,
133     kw_returned,
134     kw_returns_twice,
135     kw_signext,
136     kw_ssp,
137     kw_sspreq,
138     kw_sspstrong,
139     kw_safestack,
140     kw_sret,
141     kw_sanitize_thread,
142     kw_sanitize_memory,
143     kw_uwtable,
144     kw_zeroext,
145
146     kw_type,
147     kw_opaque,
148
149     kw_comdat,
150
151     // Comdat types
152     kw_any,
153     kw_exactmatch,
154     kw_largest,
155     kw_noduplicates,
156     kw_samesize,
157
158     kw_eq, kw_ne, kw_slt, kw_sgt, kw_sle, kw_sge, kw_ult, kw_ugt, kw_ule,
159     kw_uge, kw_oeq, kw_one, kw_olt, kw_ogt, kw_ole, kw_oge, kw_ord, kw_uno,
160     kw_ueq, kw_une,
161
162     // atomicrmw operations that aren't also instruction keywords.
163     kw_xchg, kw_nand, kw_max, kw_min, kw_umax, kw_umin,
164
165     // Instruction Opcodes (Opcode in UIntVal).
166     kw_add,  kw_fadd, kw_sub,  kw_fsub, kw_mul,  kw_fmul,
167     kw_udiv, kw_sdiv, kw_fdiv,
168     kw_urem, kw_srem, kw_frem, kw_shl,  kw_lshr, kw_ashr,
169     kw_and,  kw_or,   kw_xor,  kw_icmp, kw_fcmp,
170
171     kw_phi, kw_call,
172     kw_trunc, kw_zext, kw_sext, kw_fptrunc, kw_fpext, kw_uitofp, kw_sitofp,
173     kw_fptoui, kw_fptosi, kw_inttoptr, kw_ptrtoint, kw_bitcast,
174     kw_addrspacecast,
175     kw_select, kw_va_arg,
176
177     kw_landingpad, kw_personality, kw_cleanup, kw_catch, kw_filter,
178
179     kw_ret, kw_br, kw_switch, kw_indirectbr, kw_invoke, kw_resume,
180     kw_unreachable,
181
182     kw_alloca, kw_load, kw_store, kw_fence, kw_cmpxchg, kw_atomicrmw,
183     kw_getelementptr,
184
185     kw_extractelement, kw_insertelement, kw_shufflevector,
186     kw_extractvalue, kw_insertvalue, kw_blockaddress,
187
188     // Metadata types.
189     kw_distinct,
190
191     // Use-list order directives.
192     kw_uselistorder, kw_uselistorder_bb,
193
194     // Unsigned Valued tokens (UIntVal).
195     GlobalID,          // @42
196     LocalVarID,        // %42
197     AttrGrpID,         // #42
198
199     // String valued tokens (StrVal).
200     LabelStr,          // foo:
201     GlobalVar,         // @foo @"foo"
202     ComdatVar,         // $foo
203     LocalVar,          // %foo %"foo"
204     MetadataVar,       // !foo
205     StringConstant,    // "foo"
206     DwarfTag,          // DW_TAG_foo
207     DwarfAttEncoding,  // DW_ATE_foo
208     DwarfVirtuality,   // DW_VIRTUALITY_foo
209     DwarfLang,         // DW_LANG_foo
210     DwarfOp,           // DW_OP_foo
211     DIFlag,            // DIFlagFoo
212
213     // Type valued tokens (TyVal).
214     Type,
215
216     APFloat,  // APFloatVal
217     APSInt // APSInt
218   };
219 } // end namespace lltok
220 } // end namespace llvm
221
222 #endif