diff options
author | David Blaikie <dblaikie@gmail.com> | 2015-09-14 20:29:26 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2015-09-14 20:29:26 +0000 |
commit | 6614d8d2308f2571a79592cdd4b4611a1e072898 (patch) | |
tree | 12bc2f2be4b939fca06d489111ec5e8aa563b464 /llvm/lib/Transforms/Utils/CloneModule.cpp | |
parent | 601771ebc089d92cbdc674d1856f44ce325c82d5 (diff) | |
download | llvm-6614d8d2308f2571a79592cdd4b4611a1e072898.zip llvm-6614d8d2308f2571a79592cdd4b4611a1e072898.tar.gz llvm-6614d8d2308f2571a79592cdd4b4611a1e072898.tar.bz2 |
[opaque pointer types] Switch a few cases of getElementType over, since I had them lying around anyway
llvm-svn: 247610
Diffstat (limited to 'llvm/lib/Transforms/Utils/CloneModule.cpp')
-rw-r--r-- | llvm/lib/Transforms/Utils/CloneModule.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/llvm/lib/Transforms/Utils/CloneModule.cpp b/llvm/lib/Transforms/Utils/CloneModule.cpp index 9136b19..3adb6e4 100644 --- a/llvm/lib/Transforms/Utils/CloneModule.cpp +++ b/llvm/lib/Transforms/Utils/CloneModule.cpp @@ -94,10 +94,9 @@ Module *llvm::CloneModule( // correctness. continue; } - auto *PTy = cast<PointerType>(I->getType()); - auto *GA = - GlobalAlias::create(PTy->getElementType(), PTy->getAddressSpace(), - I->getLinkage(), I->getName(), New); + auto *GA = GlobalAlias::create(I->getValueType(), + I->getType()->getPointerAddressSpace(), + I->getLinkage(), I->getName(), New); GA->copyAttributesFrom(I); VMap[I] = GA; } |