summaryrefslogtreecommitdiff
path: root/lib/ExecutionEngine
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2015-04-29 21:22:39 +0000
committerDavid Blaikie <dblaikie@gmail.com>2015-04-29 21:22:39 +0000
commit39e7388a193f9e0b7d161b37ff133fe19764a7a8 (patch)
tree77ebef9b7dd8cb776072155549ebf2a14e349218 /lib/ExecutionEngine
parenta19abeb7abaa80b946c593164a08c3d230183a95 (diff)
downloadllvm-39e7388a193f9e0b7d161b37ff133fe19764a7a8.tar.gz
[opaque pointer type] Pass GlobalAlias the actual pointer type rather than decomposing it into pointee type + address space
Many of the callers already have the pointer type anyway, and for the couple of callers that don't it's pretty easy to call PointerType::get on the pointee type and address space. This avoids LLParser from using PointerType::getElementType when parsing GlobalAliases from IR. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236160 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/ExecutionEngine')
-rw-r--r--lib/ExecutionEngine/Orc/CloneSubModule.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/ExecutionEngine/Orc/CloneSubModule.cpp b/lib/ExecutionEngine/Orc/CloneSubModule.cpp
index a3196ad2f789..c9810097d7d2 100644
--- a/lib/ExecutionEngine/Orc/CloneSubModule.cpp
+++ b/lib/ExecutionEngine/Orc/CloneSubModule.cpp
@@ -61,9 +61,7 @@ void CloneSubModule(llvm::Module &Dst, const Module &Src,
for (Module::const_alias_iterator I = Src.alias_begin(), E = Src.alias_end();
I != E; ++I) {
auto *PTy = cast<PointerType>(I->getType());
- auto *GA =
- GlobalAlias::create(PTy->getElementType(), PTy->getAddressSpace(),
- I->getLinkage(), I->getName(), &Dst);
+ auto *GA = GlobalAlias::create(PTy, I->getLinkage(), I->getName(), &Dst);
GA->copyAttributesFrom(I);
VMap[I] = GA;
}