Added a Register token to AsmToken and the appropriate

accessor method for its value.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94241 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Sean Callanan 2010-01-22 22:42:22 +00:00
parent 1caedd056d
commit 5d74e1f644

View File

@ -33,6 +33,9 @@ public:
// Integer values.
Integer,
// Register values (stored in IntVal). Only used by TargetAsmLexer.
Register,
// No-value.
EndOfStatement,
Colon,
@ -96,6 +99,13 @@ public:
assert(Kind == Integer && "This token isn't an integer!");
return IntVal;
}
/// getRegVal - Get the register number for the current token, which should
/// be a register.
unsigned getRegVal() const {
assert(Kind == Register && "This token isn't a register!");
return static_cast<unsigned>(IntVal);
}
};
/// MCAsmLexer - Generic assembler lexer interface, for use by target specific