LLVM API Documentation

LLToken.h

Go to the documentation of this file.
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_linker_private, kw_internal, kw_linkonce, kw_linkonce_odr,
00040     kw_weak, kw_weak_odr, kw_appending, kw_dllimport, kw_dllexport, kw_common,
00041     kw_available_externally,
00042     kw_default, kw_hidden, kw_protected,
00043     kw_extern_weak,
00044     kw_external, kw_thread_local,
00045     kw_zeroinitializer,
00046     kw_undef, kw_null,
00047     kw_to,
00048     kw_tail,
00049     kw_target,
00050     kw_triple,
00051     kw_deplibs,
00052     kw_datalayout,
00053     kw_volatile,
00054     kw_nuw,
00055     kw_nsw,
00056     kw_exact,
00057     kw_inbounds,
00058     kw_align,
00059     kw_addrspace,
00060     kw_section,
00061     kw_alias,
00062     kw_module,
00063     kw_asm,
00064     kw_sideeffect,
00065     kw_gc,
00066     kw_c,
00067 
00068     kw_cc, kw_ccc, kw_fastcc, kw_coldcc,
00069     kw_x86_stdcallcc, kw_x86_fastcallcc,
00070     kw_arm_apcscc, kw_arm_aapcscc, kw_arm_aapcs_vfpcc,
00071 
00072     kw_signext,
00073     kw_zeroext,
00074     kw_inreg,
00075     kw_sret,
00076     kw_nounwind,
00077     kw_noreturn,
00078     kw_noalias,
00079     kw_nocapture,
00080     kw_byval,
00081     kw_nest,
00082     kw_readnone,
00083     kw_readonly,
00084 
00085     kw_noinline,
00086     kw_alwaysinline,
00087     kw_optsize,
00088     kw_ssp,
00089     kw_sspreq,
00090     kw_noredzone,
00091     kw_noimplicitfloat,
00092     kw_naked,
00093 
00094     kw_type,
00095     kw_opaque,
00096 
00097     kw_eq, kw_ne, kw_slt, kw_sgt, kw_sle, kw_sge, kw_ult, kw_ugt, kw_ule,
00098     kw_uge, kw_oeq, kw_one, kw_olt, kw_ogt, kw_ole, kw_oge, kw_ord, kw_uno,
00099     kw_ueq, kw_une,
00100 
00101     // Instruction Opcodes (Opcode in UIntVal).
00102     kw_add,  kw_fadd, kw_sub,  kw_fsub, kw_mul,  kw_fmul,
00103     kw_udiv, kw_sdiv, kw_fdiv,
00104     kw_urem, kw_srem, kw_frem, kw_shl,  kw_lshr, kw_ashr,
00105     kw_and,  kw_or,   kw_xor,  kw_icmp, kw_fcmp,
00106 
00107     kw_phi, kw_call,
00108     kw_trunc, kw_zext, kw_sext, kw_fptrunc, kw_fpext, kw_uitofp, kw_sitofp,
00109     kw_fptoui, kw_fptosi, kw_inttoptr, kw_ptrtoint, kw_bitcast,
00110     kw_select, kw_va_arg,
00111 
00112     kw_ret, kw_br, kw_switch, kw_invoke, kw_unwind, kw_unreachable,
00113 
00114     kw_malloc, kw_alloca, kw_free, kw_load, kw_store, kw_getelementptr,
00115 
00116     kw_extractelement, kw_insertelement, kw_shufflevector, kw_getresult,
00117     kw_extractvalue, kw_insertvalue,
00118 
00119     // Unsigned Valued tokens (UIntVal).
00120     GlobalID,          // @42
00121     LocalVarID,        // %42
00122 
00123     // String valued tokens (StrVal).
00124     LabelStr,          // foo:
00125     GlobalVar,         // @foo @"foo"
00126     LocalVar,          // %foo %"foo"
00127     StringConstant,    // "foo"
00128     NamedMD,           // !foo
00129 
00130     // Metadata valued tokens.
00131     Metadata,          // !"foo" !{i8 42}
00132 
00133     // Type valued tokens (TyVal).
00134     Type,
00135 
00136     APFloat,  // APFloatVal
00137     APSInt // APSInt
00138   };
00139 } // end namespace lltok
00140 } // end namespace llvm
00141 
00142 #endif