summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Utils/CloneModule.cpp
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2009-10-24 23:37:16 +0000
committerDan Gohman <gohman@apple.com>2009-10-24 23:37:16 +0000
commitef41a1ce3cbfb6f092ee6b3d540c29a278abbe2a (patch)
treec2bd6a59d318e43d9f8ece6337c14bb2eed9a00f /llvm/lib/Transforms/Utils/CloneModule.cpp
parent8f4078ba391a091b7eb119db1865848c5c95a7b2 (diff)
downloadbcm5719-llvm-ef41a1ce3cbfb6f092ee6b3d540c29a278abbe2a.tar.gz
bcm5719-llvm-ef41a1ce3cbfb6f092ee6b3d540c29a278abbe2a.zip
MapValue doesn't needs its LLVMContext argument.
llvm-svn: 85020
Diffstat (limited to 'llvm/lib/Transforms/Utils/CloneModule.cpp')
-rw-r--r--llvm/lib/Transforms/Utils/CloneModule.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/lib/Transforms/Utils/CloneModule.cpp b/llvm/lib/Transforms/Utils/CloneModule.cpp
index 0285f8c8d10..a163f89cc37 100644
--- a/llvm/lib/Transforms/Utils/CloneModule.cpp
+++ b/llvm/lib/Transforms/Utils/CloneModule.cpp
@@ -89,8 +89,7 @@ Module *llvm::CloneModule(const Module *M,
GlobalVariable *GV = cast<GlobalVariable>(ValueMap[I]);
if (I->hasInitializer())
GV->setInitializer(cast<Constant>(MapValue(I->getInitializer(),
- ValueMap,
- M->getContext())));
+ ValueMap)));
GV->setLinkage(I->getLinkage());
GV->setThreadLocal(I->isThreadLocal());
GV->setConstant(I->isConstant());
@@ -121,7 +120,7 @@ Module *llvm::CloneModule(const Module *M,
GlobalAlias *GA = cast<GlobalAlias>(ValueMap[I]);
GA->setLinkage(I->getLinkage());
if (const Constant* C = I->getAliasee())
- GA->setAliasee(cast<Constant>(MapValue(C, ValueMap, M->getContext())));
+ GA->setAliasee(cast<Constant>(MapValue(C, ValueMap)));
}
return New;
OpenPOWER on IntegriCloud