[llvm-commits] [llvm] r156707 - in /llvm/trunk: lib/MC/MCParser/AsmParser.cpp test/MC/AsmParser/extern.s
Benjamin Kramer
benny.kra at googlemail.com
Sat May 12 04:18:59 PDT 2012
Author: d0k
Date: Sat May 12 06:18:59 2012
New Revision: 156707
URL: http://llvm.org/viewvc/llvm-project?rev=156707&view=rev
Log:
AsmParser: ignore the .extern directive.
Added:
llvm/trunk/test/MC/AsmParser/extern.s
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=156707&r1=156706&r2=156707&view=diff
==============================================================================
--- llvm/trunk/lib/MC/MCParser/AsmParser.cpp (original)
+++ llvm/trunk/lib/MC/MCParser/AsmParser.cpp Sat May 12 06:18:59 2012
@@ -1220,6 +1220,10 @@
// Symbol attribute directives
+ if (IDVal == ".extern") {
+ EatToEndOfStatement(); // .extern is the default, ignore it.
+ return false;
+ }
if (IDVal == ".globl" || IDVal == ".global")
return ParseDirectiveSymbolAttribute(MCSA_Global);
if (IDVal == ".indirect_symbol")
Added: llvm/trunk/test/MC/AsmParser/extern.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/AsmParser/extern.s?rev=156707&view=auto
==============================================================================
--- llvm/trunk/test/MC/AsmParser/extern.s (added)
+++ llvm/trunk/test/MC/AsmParser/extern.s Sat May 12 06:18:59 2012
@@ -0,0 +1,4 @@
+# RUN: llvm-mc -triple i386-unknown-unknown %s | FileCheck %s
+
+# CHECK-NOT: foo
+.extern foo
More information about the llvm-commits
mailing list