aboutsummaryrefslogtreecommitdiff
path: root/lib/Transforms/Utils/CloneModule.cpp
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2009-07-05 22:41:43 +0000
committerOwen Anderson <resistor@mac.com>2009-07-05 22:41:43 +0000
commit0a205a459884ec745df1c529396dd921f029dafd (patch)
tree905109491ef6c2ea3d99d01fc48af9c2c633e645 /lib/Transforms/Utils/CloneModule.cpp
parentdb882950f3bcf7f710843610e917988daeafffc2 (diff)
More LLVMContext-ification.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74807 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Utils/CloneModule.cpp')
-rw-r--r--lib/Transforms/Utils/CloneModule.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Transforms/Utils/CloneModule.cpp b/lib/Transforms/Utils/CloneModule.cpp
index 82f5b93a95..f6056364a7 100644
--- a/lib/Transforms/Utils/CloneModule.cpp
+++ b/lib/Transforms/Utils/CloneModule.cpp
@@ -88,7 +88,8 @@ Module *llvm::CloneModule(const Module *M,
GlobalVariable *GV = cast<GlobalVariable>(ValueMap[I]);
if (I->hasInitializer())
GV->setInitializer(cast<Constant>(MapValue(I->getInitializer(),
- ValueMap)));
+ ValueMap,
+ &M->getContext())));
GV->setLinkage(I->getLinkage());
GV->setThreadLocal(I->isThreadLocal());
GV->setConstant(I->isConstant());
@@ -119,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)));
+ GA->setAliasee(cast<Constant>(MapValue(C, ValueMap, &M->getContext())));
}
return New;