[llvm-commits] [llvm] r94241 - /llvm/trunk/include/llvm/MC/MCParser/MCAsmLexer.h
Sean Callanan
scallanan at apple.com
Fri Jan 22 14:42:22 PST 2010
Author: spyffe
Date: Fri Jan 22 16:42:22 2010
New Revision: 94241
URL: http://llvm.org/viewvc/llvm-project?rev=94241&view=rev
Log:
Added a Register token to AsmToken and the appropriate
accessor method for its value.
Modified:
llvm/trunk/include/llvm/MC/MCParser/MCAsmLexer.h
Modified: llvm/trunk/include/llvm/MC/MCParser/MCAsmLexer.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/MC/MCParser/MCAsmLexer.h?rev=94241&r1=94240&r2=94241&view=diff
==============================================================================
--- llvm/trunk/include/llvm/MC/MCParser/MCAsmLexer.h (original)
+++ llvm/trunk/include/llvm/MC/MCParser/MCAsmLexer.h Fri Jan 22 16:42:22 2010
@@ -33,6 +33,9 @@
// Integer values.
Integer,
+ // Register values (stored in IntVal). Only used by TargetAsmLexer.
+ Register,
+
// No-value.
EndOfStatement,
Colon,
@@ -96,6 +99,13 @@
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
More information about the llvm-commits
mailing list