[llvm-commits] [llvm] r156707 - in /llvm/trunk: lib/MC/MCParser/AsmParser.cpp test/MC/AsmParser/extern.s

Jim Grosbach grosbach at apple.com
Mon May 14 10:09:20 PDT 2012


Do we still want to check for syntactic correctness of the directive?

-Jim

On May 12, 2012, at 4:18 AM, Benjamin Kramer <benny.kra at googlemail.com> wrote:

> 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
> 
> 
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits




More information about the llvm-commits mailing list