[llvm-commits] [llvm] r156707 - in /llvm/trunk: lib/MC/MCParser/AsmParser.cpp test/MC/AsmParser/extern.s
Benjamin Kramer
benny.kra at googlemail.com
Mon May 14 11:36:42 PDT 2012
On 14.05.2012, at 19:09, Jim Grosbach wrote:
> Do we still want to check for syntactic correctness of the directive?
I tried gas on linux and it seems not to care so I opted for the easy and compatible way. Do you think it would be better to validate it?
- Ben
>
> -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