diff options
author | David Blaikie <dblaikie@gmail.com> | 2015-09-14 18:01:59 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2015-09-14 18:01:59 +0000 |
commit | 16a2f3e3022a48426e10ab7b822e8dc824abe23c (patch) | |
tree | a2f8977ccdc019e30fe644e1104bfecb47b57f39 /llvm/lib/Linker/LinkModules.cpp | |
parent | c23a8b2d39f8965af32e880d2d336f4f77d8a867 (diff) | |
download | bcm5719-llvm-16a2f3e3022a48426e10ab7b822e8dc824abe23c.tar.gz bcm5719-llvm-16a2f3e3022a48426e10ab7b822e8dc824abe23c.zip |
Revert "[opaque pointer type] Pass GlobalAlias the actual pointer type rather than decomposing it into pointee type + address space"
This was a flawed change - it just caused the getElementType call to be
deferred until later, when we really need to remove it. Now that the IR
for GlobalAliases has been updated, the root cause is addressed that way
instead and this change is no longer needed (and in fact gets in the way
- because we want to pass the pointee type directly down further).
Follow up patches to push this through GlobalValue, bitcode format, etc,
will come along soon.
This reverts commit 236160.
llvm-svn: 247585
Diffstat (limited to 'llvm/lib/Linker/LinkModules.cpp')
-rw-r--r-- | llvm/lib/Linker/LinkModules.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Linker/LinkModules.cpp b/llvm/lib/Linker/LinkModules.cpp index 9d5e0b475d8..4b676cdf9dc 100644 --- a/llvm/lib/Linker/LinkModules.cpp +++ b/llvm/lib/Linker/LinkModules.cpp @@ -586,7 +586,8 @@ static GlobalAlias *copyGlobalAliasProto(TypeMapTy &TypeMap, Module &DstM, // If there is no linkage to be performed or we're linking from the source, // bring over SGA. auto *PTy = cast<PointerType>(TypeMap.get(SGA->getType())); - return GlobalAlias::create(PTy, SGA->getLinkage(), SGA->getName(), &DstM); + return GlobalAlias::create(PTy->getElementType(), PTy->getAddressSpace(), + SGA->getLinkage(), SGA->getName(), &DstM); } static GlobalValue *copyGlobalValueProto(TypeMapTy &TypeMap, Module &DstM, |