MIR Serialization: Serialize the 'internal' register operand flag.
[oota-llvm.git] / lib / CodeGen / MIRParser / MILexer.h
index 75cf3f3463e1b5219a3f80b0858d7345ed48b11a..e7abbb2dd8916246d8546365290ab5cf600860ed 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,6 +52,7 @@ struct MIToken {
     kw_dead,
     kw_killed,
     kw_undef,
+    kw_internal,
     kw_early_clobber,
     kw_debug_use,
     kw_frame_setup,
@@ -70,13 +74,21 @@ struct MIToken {
     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,
 
     // Identifier tokens
     Identifier,
     IntegerType,
     NamedRegister,
+    MachineBasicBlockLabel,
     MachineBasicBlock,
     StackObject,
     FixedStackObject,
@@ -115,6 +127,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;
@@ -123,7 +139,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 {
@@ -146,10 +163,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;
   }
 };