[cfe-commits] r43434 - /cfe/trunk/Parse/ParseStmt.cpp

Chris Lattner sabre at nondot.org
Sun Oct 28 21:06:25 PDT 2007


Author: lattner
Date: Sun Oct 28 23:06:22 2007
New Revision: 43434

URL: http://llvm.org/viewvc/llvm-project?rev=43434&view=rev
Log:
Fix a parser bug on labeled inline asm stmts, allowing us
to parse stuff like:

asm volatile("1:  rex64/fxrstor (%[fx])\n\t"
       "2:\n"
       ".section .fixup,\"ax\"\n"
       "3:  movl $-1,%[err]\n"
       "    jmp  2b\n"
       ".previous\n"
       ".section __ex_table,\"a\"\n"
       "   .align 8\n"
       "   .quad  1b,3b\n"
       ".previous"
       : [err] "=r" (err)
       : [fx] "cdaSDb" (fx), "m" (*fx), "0" (0));

This reduces # diagnostics on PR1750 from 49 to 37.



Modified:
    cfe/trunk/Parse/ParseStmt.cpp

Modified: cfe/trunk/Parse/ParseStmt.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/Parse/ParseStmt.cpp?rev=43434&r1=43433&r2=43434&view=diff

==============================================================================
--- cfe/trunk/Parse/ParseStmt.cpp (original)
+++ cfe/trunk/Parse/ParseStmt.cpp Sun Oct 28 23:06:22 2007
@@ -985,6 +985,10 @@
         SkipUntil(tok::r_paren);
         return;
       }
+      
+      // Eat the identifier, FIXME: capture it.
+      ConsumeToken();
+      
       MatchRHSPunctuation(tok::r_square, Loc);
     }
     





More information about the cfe-commits mailing list