aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/IPO/MergeFunctions.cpp
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2015-09-14 20:29:26 +0000
committerDavid Blaikie <dblaikie@gmail.com>2015-09-14 20:29:26 +0000
commit6614d8d2308f2571a79592cdd4b4611a1e072898 (patch)
tree12bc2f2be4b939fca06d489111ec5e8aa563b464 /llvm/lib/Transforms/IPO/MergeFunctions.cpp
parent601771ebc089d92cbdc674d1856f44ce325c82d5 (diff)
downloadllvm-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/IPO/MergeFunctions.cpp')
-rw-r--r--llvm/lib/Transforms/IPO/MergeFunctions.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/llvm/lib/Transforms/IPO/MergeFunctions.cpp b/llvm/lib/Transforms/IPO/MergeFunctions.cpp
index a1f4513..2b0bcdf 100644
--- a/llvm/lib/Transforms/IPO/MergeFunctions.cpp
+++ b/llvm/lib/Transforms/IPO/MergeFunctions.cpp
@@ -1682,9 +1682,7 @@ void MergeFunctions::writeThunk(Function *F, Function *G) {
// Replace G with an alias to F and delete G.
void MergeFunctions::writeAlias(Function *F, Function *G) {
- PointerType *PTy = G->getType();
- auto *GA = GlobalAlias::create(PTy->getElementType(), PTy->getAddressSpace(),
- G->getLinkage(), "", F);
+ auto *GA = GlobalAlias::create(G->getLinkage(), "", F);
F->setAlignment(std::max(F->getAlignment(), G->getAlignment()));
GA->takeName(G);
GA->setVisibility(G->getVisibility());