Add in support for SPIR to LLVM core. This adds a new target and two new calling...
[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 LIBS_ASMPARSER_LLTOKEN_H
15 #define LIBS_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     backslash,         // \    (not /)
32     exclaim,           // !
33
34     kw_x,
35     kw_true,    kw_false,
36     kw_declare, kw_define,
37     kw_global,  kw_constant,
38
39     kw_private, kw_linker_private, kw_linker_private_weak,
40     kw_linker_private_weak_def_auto, // FIXME: For backwards compatibility.
41     kw_internal,
42     kw_linkonce, kw_linkonce_odr, kw_linkonce_odr_auto_hide,
43     kw_weak, 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_extern_weak,
48     kw_external, kw_thread_local,
49     kw_localdynamic, kw_initialexec, kw_localexec,
50     kw_zeroinitializer,
51     kw_undef, kw_null,
52     kw_to,
53     kw_tail,
54     kw_target,
55     kw_triple,
56     kw_unwind,
57     kw_deplibs,
58     kw_datalayout,
59     kw_volatile,
60     kw_atomic,
61     kw_unordered, kw_monotonic, kw_acquire, kw_release, kw_acq_rel, kw_seq_cst,
62     kw_singlethread,
63     kw_nuw,
64     kw_nsw,
65     kw_exact,
66     kw_inbounds,
67     kw_align,
68     kw_addrspace,
69     kw_section,
70     kw_alias,
71     kw_module,
72     kw_asm,
73     kw_sideeffect,
74     kw_alignstack,
75     kw_inteldialect,
76     kw_gc,
77     kw_c,
78
79     kw_cc, kw_ccc, kw_fastcc, kw_coldcc,
80     kw_x86_stdcallcc, kw_x86_fastcallcc, kw_x86_thiscallcc,
81     kw_arm_apcscc, kw_arm_aapcscc, kw_arm_aapcs_vfpcc,
82     kw_msp430_intrcc,
83     kw_ptx_kernel, kw_ptx_device,
84     kw_spir_kernel, kw_spir_func,
85
86     kw_signext,
87     kw_zeroext,
88     kw_inreg,
89     kw_sret,
90     kw_nounwind,
91     kw_noreturn,
92     kw_noalias,
93     kw_nocapture,
94     kw_byval,
95     kw_nest,
96     kw_readnone,
97     kw_readonly,
98     kw_uwtable,
99     kw_returns_twice,
100
101     kw_inlinehint,
102     kw_noinline,
103     kw_alwaysinline,
104     kw_optsize,
105     kw_ssp,
106     kw_sspreq,
107     kw_noredzone,
108     kw_noimplicitfloat,
109     kw_naked,
110     kw_nonlazybind,
111     kw_address_safety,
112
113     kw_type,
114     kw_opaque,
115
116     kw_eq, kw_ne, kw_slt, kw_sgt, kw_sle, kw_sge, kw_ult, kw_ugt, kw_ule,
117     kw_uge, kw_oeq, kw_one, kw_olt, kw_ogt, kw_ole, kw_oge, kw_ord, kw_uno,
118     kw_ueq, kw_une,
119
120     // atomicrmw operations that aren't also instruction keywords.
121     kw_xchg, kw_nand, kw_max, kw_min, kw_umax, kw_umin,
122
123     // Instruction Opcodes (Opcode in UIntVal).
124     kw_add,  kw_fadd, kw_sub,  kw_fsub, kw_mul,  kw_fmul,
125     kw_udiv, kw_sdiv, kw_fdiv,
126     kw_urem, kw_srem, kw_frem, kw_shl,  kw_lshr, kw_ashr,
127     kw_and,  kw_or,   kw_xor,  kw_icmp, kw_fcmp,
128
129     kw_phi, kw_call,
130     kw_trunc, kw_zext, kw_sext, kw_fptrunc, kw_fpext, kw_uitofp, kw_sitofp,
131     kw_fptoui, kw_fptosi, kw_inttoptr, kw_ptrtoint, kw_bitcast,
132     kw_select, kw_va_arg,
133
134     kw_landingpad, kw_personality, kw_cleanup, kw_catch, kw_filter,
135
136     kw_ret, kw_br, kw_switch, kw_indirectbr, kw_invoke, kw_resume,
137     kw_unreachable,
138
139     kw_alloca, kw_load, kw_store, kw_fence, kw_cmpxchg, kw_atomicrmw,
140     kw_getelementptr,
141
142     kw_extractelement, kw_insertelement, kw_shufflevector,
143     kw_extractvalue, kw_insertvalue, kw_blockaddress,
144
145     // Unsigned Valued tokens (UIntVal).
146     GlobalID,          // @42
147     LocalVarID,        // %42
148
149     // String valued tokens (StrVal).
150     LabelStr,          // foo:
151     GlobalVar,         // @foo @"foo"
152     LocalVar,          // %foo %"foo"
153     MetadataVar,       // !foo
154     StringConstant,    // "foo"
155
156     // Type valued tokens (TyVal).
157     Type,
158
159     APFloat,  // APFloatVal
160     APSInt // APSInt
161   };
162 } // end namespace lltok
163 } // end namespace llvm
164
165 #endif