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:
parent
b1ebe8137b
commit
d1eb63a340
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user