[llvm-branch-commits] [llvm-branch] r168435 - in /llvm/branches/release_32: ./ lib/AsmParser/LLParser.cpp test/Assembler/global-addrspace-forwardref.ll
Pawel Wodnicki
pawel at 32bitmicro.com
Wed Nov 21 08:40:23 PST 2012
Author: pawel
Date: Wed Nov 21 10:40:23 2012
New Revision: 168435
URL: http://llvm.org/viewvc/llvm-project?rev=168435&view=rev
Log:
Merging r168197: into 3.2 release branch
Preserve address space of forward-referenced global variables in the LL parser
Before, the parser would assert on the following code:
@a2 = global i8 addrspace(1)* @a
@a = addrspace(1) global i8 0
because the type of @a was "i8*" instead of "i8 addrspace(1)*" when parsing
the initializer for @a2.
Added:
llvm/branches/release_32/test/Assembler/global-addrspace-forwardref.ll
- copied unchanged from r168197, llvm/trunk/test/Assembler/global-addrspace-forwardref.ll
Modified:
llvm/branches/release_32/ (props changed)
llvm/branches/release_32/lib/AsmParser/LLParser.cpp
Propchange: llvm/branches/release_32/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Nov 21 10:40:23 2012
@@ -1,3 +1,3 @@
/llvm/branches/Apple/Pertwee:110850,110961
/llvm/branches/type-system-rewrite:133420-134817
-/llvm/trunk:155241,167718-167719,167731,167737,167743,167750,167784,167811,167817,167855,167860-167864,167875,167942,167948,167966,168001,168189,168198,168316,168319,168352
+/llvm/trunk:155241,167718-167719,167731,167737,167743,167750,167784,167811,167817,167855,167860-167864,167875,167942,167948,167966,168001,168189,168197-168198,168316,168319,168352
Modified: llvm/branches/release_32/lib/AsmParser/LLParser.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_32/lib/AsmParser/LLParser.cpp?rev=168435&r1=168434&r2=168435&view=diff
==============================================================================
--- llvm/branches/release_32/lib/AsmParser/LLParser.cpp (original)
+++ llvm/branches/release_32/lib/AsmParser/LLParser.cpp Wed Nov 21 10:40:23 2012
@@ -779,7 +779,9 @@
FwdVal = Function::Create(FT, GlobalValue::ExternalWeakLinkage, Name, M);
else
FwdVal = new GlobalVariable(*M, PTy->getElementType(), false,
- GlobalValue::ExternalWeakLinkage, 0, Name);
+ GlobalValue::ExternalWeakLinkage, 0, Name,
+ 0, GlobalVariable::NotThreadLocal,
+ PTy->getAddressSpace());
ForwardRefVals[Name] = std::make_pair(FwdVal, Loc);
return FwdVal;
More information about the llvm-branch-commits
mailing list