[llvm] r210121 - Fix a small bug in the parsing of anonymous globals.
Reid Kleckner
rnk at google.com
Tue Jun 3 13:42:49 PDT 2014
Seems good for LLVM IL consistency, but what does it mean to export an
unnamed global? Now I want a test for the error that we should produce
somewhere when running llc on this. :)
On Tue, Jun 3, 2014 at 1:07 PM, Rafael Espindola <rafael.espindola at gmail.com
> wrote:
> Author: rafael
> Date: Tue Jun 3 15:07:32 2014
> New Revision: 210121
>
> URL: http://llvm.org/viewvc/llvm-project?rev=210121&view=rev
> Log:
> Fix a small bug in the parsing of anonymous globals.
>
> It was able to parse
>
> hidden dllexport global i32 42
>
> but not
>
> dllexport global i32 42
>
> Modified:
> llvm/trunk/lib/AsmParser/LLParser.cpp
> llvm/trunk/test/Feature/globalvars.ll
>
> Modified: llvm/trunk/lib/AsmParser/LLParser.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/AsmParser/LLParser.cpp?rev=210121&r1=210120&r2=210121&view=diff
>
> ==============================================================================
> --- llvm/trunk/lib/AsmParser/LLParser.cpp (original)
> +++ llvm/trunk/lib/AsmParser/LLParser.cpp Tue Jun 3 15:07:32 2014
> @@ -261,6 +261,8 @@ bool LLParser::ParseTopLevelEntities() {
> case lltok::kw_default: // OptionalVisibility
> case lltok::kw_hidden: // OptionalVisibility
> case lltok::kw_protected: // OptionalVisibility
> + case lltok::kw_dllimport: // OptionalDLLStorageClass
> + case lltok::kw_dllexport: // OptionalDLLStorageClass
> case lltok::kw_thread_local: // OptionalThreadLocal
> case lltok::kw_addrspace: // OptionalAddrSpace
> case lltok::kw_constant: // GlobalType
>
> Modified: llvm/trunk/test/Feature/globalvars.ll
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Feature/globalvars.ll?rev=210121&r1=210120&r2=210121&view=diff
>
> ==============================================================================
> --- llvm/trunk/test/Feature/globalvars.ll (original)
> +++ llvm/trunk/test/Feature/globalvars.ll Tue Jun 3 15:07:32 2014
> @@ -16,3 +16,5 @@ define i32 @foo(i32 %blah) {
> ret i32 %blah
> }
>
> +hidden dllexport global i32 42
> +dllexport global i32 42
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140603/c19e4e91/attachment.html>
More information about the llvm-commits
mailing list