MIR Serialization: Serialize the memory operand's TBAA metadata node.
[oota-llvm.git] / lib / CodeGen / MIRParser / MILexer.h
index 752344ed050d128f1a05225379acaeff9259dcaa..fc92cc14e89db9da74030f2ab3fab0f27a95cb17 100644 (file)
@@ -30,6 +30,7 @@ struct MIToken {
     // Markers
     Eof,
     Error,
+    Newline,
 
     // Tokens with no info.
     comma,
@@ -40,6 +41,8 @@ struct MIToken {
     exclaim,
     lparen,
     rparen,
+    lbrace,
+    rbrace,
     plus,
     minus,
 
@@ -49,10 +52,12 @@ struct MIToken {
     kw_dead,
     kw_killed,
     kw_undef,
+    kw_internal,
     kw_early_clobber,
     kw_debug_use,
     kw_frame_setup,
     kw_debug_location,
+    kw_cfi_same_value,
     kw_cfi_offset,
     kw_cfi_def_cfa_register,
     kw_cfi_def_cfa_offset,
@@ -69,11 +74,25 @@ struct MIToken {
     kw_volatile,
     kw_non_temporal,
     kw_invariant,
+    kw_align,
+    kw_stack,
+    kw_got,
+    kw_jump_table,
+    kw_constant_pool,
+    kw_liveout,
+    kw_address_taken,
+    kw_landing_pad,
+    kw_liveins,
+    kw_successors,
+
+    // Named metadata keywords
+    md_tbaa,
 
     // Identifier tokens
     Identifier,
     IntegerType,
     NamedRegister,
+    MachineBasicBlockLabel,
     MachineBasicBlock,
     StackObject,
     FixedStackObject,
@@ -112,6 +131,10 @@ public:
 
   bool isError() const { return Kind == Error; }
 
+  bool isNewlineOrEOF() const { return Kind == Newline || Kind == Eof; }
+
+  bool isErrorOrEOF() const { return Kind == Error || Kind == Eof; }
+
   bool isRegister() const {
     return Kind == NamedRegister || Kind == underscore ||
            Kind == VirtualRegister;
@@ -120,7 +143,8 @@ public:
   bool isRegisterFlag() const {
     return Kind == kw_implicit || Kind == kw_implicit_define ||
            Kind == kw_dead || Kind == kw_killed || Kind == kw_undef ||
-           Kind == kw_early_clobber || Kind == kw_debug_use;
+           Kind == kw_internal || Kind == kw_early_clobber ||
+           Kind == kw_debug_use;
   }
 
   bool isMemoryOperandFlag() const {
@@ -143,10 +167,10 @@ public:
 
   bool hasIntegerValue() const {
     return Kind == IntegerLiteral || Kind == MachineBasicBlock ||
-           Kind == StackObject || Kind == FixedStackObject ||
-           Kind == GlobalValue || Kind == VirtualRegister ||
-           Kind == ConstantPoolItem || Kind == JumpTableIndex ||
-           Kind == IRBlock;
+           Kind == MachineBasicBlockLabel || Kind == StackObject ||
+           Kind == FixedStackObject || Kind == GlobalValue ||
+           Kind == VirtualRegister || Kind == ConstantPoolItem ||
+           Kind == JumpTableIndex || Kind == IRBlock;
   }
 };