[llvm-commits] [llvm] r132466 - /llvm/trunk/lib/MC/MCParser/AsmParser.cpp

Jim Grosbach grosbach at apple.com
Thu Jun 2 10:14:04 PDT 2011


Author: grosbach
Date: Thu Jun  2 12:14:04 2011
New Revision: 132466

URL: http://llvm.org/viewvc/llvm-project?rev=132466&view=rev
Log:
.cfi directive register parsing flexibility.

Parsing a register name/number for .cfi directives can't assume that a
register name starts with a '%' token. Be more flexible and check for a
register number instead. Still unlikely to be perfect, but it allows us
to parse both plain identifiers as register names and integers as register
numbers, which is what we're wanting to support at this point.


Modified:
    llvm/trunk/lib/MC/MCParser/AsmParser.cpp

Modified: llvm/trunk/lib/MC/MCParser/AsmParser.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCParser/AsmParser.cpp?rev=132466&r1=132465&r2=132466&view=diff
==============================================================================
--- llvm/trunk/lib/MC/MCParser/AsmParser.cpp (original)
+++ llvm/trunk/lib/MC/MCParser/AsmParser.cpp Thu Jun  2 12:14:04 2011
@@ -2330,7 +2330,7 @@
                                                      SMLoc DirectiveLoc) {
   unsigned RegNo;
 
-  if (getLexer().is(AsmToken::Percent)) {
+  if (getLexer().isNot(AsmToken::Integer)) {
     if (getParser().getTargetParser().ParseRegister(RegNo, DirectiveLoc,
       DirectiveLoc))
       return true;





More information about the llvm-commits mailing list