LLVM API Documentation
00001 //===- LLToken.h - Token Codes for LLVM Assembly Files ----------*- C++ -*-===// 00002 // 00003 // The LLVM Compiler Infrastructure 00004 // 00005 // This file is distributed under the University of Illinois Open Source 00006 // License. See LICENSE.TXT for details. 00007 // 00008 //===----------------------------------------------------------------------===// 00009 // 00010 // This file defines the enums for the .ll lexer. 00011 // 00012 //===----------------------------------------------------------------------===// 00013 00014 #ifndef LIBS_ASMPARSER_LLTOKEN_H 00015 #define LIBS_ASMPARSER_LLTOKEN_H 00016 00017 namespace llvm { 00018 namespace lltok { 00019 enum Kind { 00020 // Markers 00021 Eof, Error, 00022 00023 // Tokens with no info. 00024 dotdotdot, // ... 00025 equal, comma, // = , 00026 star, // * 00027 lsquare, rsquare, // [ ] 00028 lbrace, rbrace, // { } 00029 less, greater, // < > 00030 lparen, rparen, // ( ) 00031 backslash, // \ (not /) 00032 00033 kw_x, 00034 kw_begin, kw_end, 00035 kw_true, kw_false, 00036 kw_declare, kw_define, 00037 kw_global, kw_constant, 00038 00039 kw_private, kw_internal, kw_linkonce, kw_weak, kw_appending, kw_dllimport, 00040 kw_dllexport, kw_common, kw_default, kw_hidden, kw_protected, 00041 kw_extern_weak, 00042 kw_external, kw_thread_local, 00043 kw_zeroinitializer, 00044 kw_undef, kw_null, 00045 kw_to, 00046 kw_tail, 00047 kw_target, 00048 kw_triple, 00049 kw_deplibs, 00050 kw_datalayout, 00051 kw_volatile, 00052 kw_align, 00053 kw_addrspace, 00054 kw_section, 00055 kw_alias, 00056 kw_module, 00057 kw_asm, 00058 kw_sideeffect, 00059 kw_gc, 00060 kw_c, 00061 00062 kw_cc, kw_ccc, kw_fastcc, kw_coldcc, kw_x86_stdcallcc, kw_x86_fastcallcc, 00063 00064 kw_signext, 00065 kw_zeroext, 00066 kw_inreg, 00067 kw_sret, 00068 kw_nounwind, 00069 kw_noreturn, 00070 kw_noalias, 00071 kw_nocapture, 00072 kw_byval, 00073 kw_nest, 00074 kw_readnone, 00075 kw_readonly, 00076 00077 kw_noinline, 00078 kw_alwaysinline, 00079 kw_optsize, 00080 kw_ssp, 00081 kw_sspreq, 00082 00083 kw_type, 00084 kw_opaque, 00085 00086 kw_eq, kw_ne, kw_slt, kw_sgt, kw_sle, kw_sge, kw_ult, kw_ugt, kw_ule, 00087 kw_uge, kw_oeq, kw_one, kw_olt, kw_ogt, kw_ole, kw_oge, kw_ord, kw_uno, 00088 kw_ueq, kw_une, 00089 00090 // Instruction Opcodes (Opcode in UIntVal). 00091 kw_add, kw_sub, kw_mul, kw_udiv, kw_sdiv, kw_fdiv, 00092 kw_urem, kw_srem, kw_frem, kw_shl, kw_lshr, kw_ashr, 00093 kw_and, kw_or, kw_xor, kw_icmp, kw_fcmp, kw_vicmp, kw_vfcmp, 00094 00095 kw_phi, kw_call, 00096 kw_trunc, kw_zext, kw_sext, kw_fptrunc, kw_fpext, kw_uitofp, kw_sitofp, 00097 kw_fptoui, kw_fptosi, kw_inttoptr, kw_ptrtoint, kw_bitcast, 00098 kw_select, kw_va_arg, 00099 00100 kw_ret, kw_br, kw_switch, kw_invoke, kw_unwind, kw_unreachable, 00101 00102 kw_malloc, kw_alloca, kw_free, kw_load, kw_store, kw_getelementptr, 00103 00104 kw_extractelement, kw_insertelement, kw_shufflevector, kw_getresult, 00105 kw_extractvalue, kw_insertvalue, 00106 00107 // Unsigned Valued tokens (UIntVal). 00108 GlobalID, // @42 00109 LocalVarID, // %42 00110 00111 // String valued tokens (StrVal). 00112 LabelStr, // foo: 00113 GlobalVar, // @foo @"foo" 00114 LocalVar, // %foo %"foo" 00115 StringConstant, // "foo" 00116 00117 // Type valued tokens (TyVal). 00118 Type, 00119 00120 APFloat, // APFloatVal 00121 APSInt // APSInt 00122 }; 00123 } // end namespace lltok 00124 } // end namespace llvm 00125 00126 #endif