1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-25 04:02:41 +01:00

Added a Register token to AsmToken and the appropriate

accessor method for its value.

llvm-svn: 94241
This commit is contained in:
Sean Callanan 2010-01-22 22:42:22 +00:00
parent b1ebe8137b
commit d1eb63a340

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