summaryrefslogtreecommitdiffstats
path: root/llvm/lib/ExecutionEngine/Orc
diff options
context:
space:
mode:
authorManuel Jacob <me@manueljacob.de>2016-01-16 20:30:46 +0000
committerManuel Jacob <me@manueljacob.de>2016-01-16 20:30:46 +0000
commit5f6eaac6115a44f4ef3d819123f8694d3d5825ea (patch)
tree4f2535126e469abb4e8af765dcd1692ec466424a /llvm/lib/ExecutionEngine/Orc
parent7cdedc1e029ea5860f9077abb39013ae7cc6e9cf (diff)
downloadbcm5719-llvm-5f6eaac6115a44f4ef3d819123f8694d3d5825ea.tar.gz
bcm5719-llvm-5f6eaac6115a44f4ef3d819123f8694d3d5825ea.zip
GlobalValue: use getValueType() instead of getType()->getPointerElementType().
Reviewers: mjacob Subscribers: jholewinski, arsenm, dsanders, dblaikie Patch by Eduard Burtescu. Differential Revision: http://reviews.llvm.org/D16260 llvm-svn: 257999
Diffstat (limited to 'llvm/lib/ExecutionEngine/Orc')
-rw-r--r--llvm/lib/ExecutionEngine/Orc/IndirectionUtils.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/ExecutionEngine/Orc/IndirectionUtils.cpp b/llvm/lib/ExecutionEngine/Orc/IndirectionUtils.cpp
index 34564e42b10..34b2b13abe4 100644
--- a/llvm/lib/ExecutionEngine/Orc/IndirectionUtils.cpp
+++ b/llvm/lib/ExecutionEngine/Orc/IndirectionUtils.cpp
@@ -116,7 +116,7 @@ Function* cloneFunctionDecl(Module &Dst, const Function &F,
ValueToValueMapTy *VMap) {
assert(F.getParent() != &Dst && "Can't copy decl over existing function.");
Function *NewF =
- Function::Create(cast<FunctionType>(F.getType()->getElementType()),
+ Function::Create(cast<FunctionType>(F.getValueType()),
F.getLinkage(), F.getName(), &Dst);
NewF->copyAttributesFrom(&F);
@@ -154,7 +154,7 @@ GlobalVariable* cloneGlobalVariableDecl(Module &Dst, const GlobalVariable &GV,
ValueToValueMapTy *VMap) {
assert(GV.getParent() != &Dst && "Can't copy decl over existing global var.");
GlobalVariable *NewGV = new GlobalVariable(
- Dst, GV.getType()->getElementType(), GV.isConstant(),
+ Dst, GV.getValueType(), GV.isConstant(),
GV.getLinkage(), nullptr, GV.getName(), nullptr,
GV.getThreadLocalMode(), GV.getType()->getAddressSpace());
NewGV->copyAttributesFrom(&GV);
OpenPOWER on IntegriCloud