From 8c2d2770e284d1bb42f299740604abdff7267351 Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Tue, 3 Jun 2014 20:07:32 +0000 Subject: [PATCH] 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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210121 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/AsmParser/LLParser.cpp | 2 ++ test/Feature/globalvars.ll | 2 ++ 2 files changed, 4 insertions(+) diff --git a/lib/AsmParser/LLParser.cpp b/lib/AsmParser/LLParser.cpp index 18e2b572c6a..cbcadd073d9 100644 --- a/lib/AsmParser/LLParser.cpp +++ b/lib/AsmParser/LLParser.cpp @@ -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 diff --git a/test/Feature/globalvars.ll b/test/Feature/globalvars.ll index dad1cf31d5e..84b4bdfd375 100644 --- a/test/Feature/globalvars.ll +++ b/test/Feature/globalvars.ll @@ -16,3 +16,5 @@ define i32 @foo(i32 %blah) { ret i32 %blah } +hidden dllexport global i32 42 +dllexport global i32 42