From a09d234e773549eaf50a8b724dfd7c6471b58e98 Mon Sep 17 00:00:00 2001 From: Owen Anderson Date: Sun, 5 Jul 2009 22:41:43 +0000 Subject: More LLVMContext-ification. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74807 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Transforms/Utils/CloneModule.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lib/Transforms/Utils/CloneModule.cpp') diff --git a/lib/Transforms/Utils/CloneModule.cpp b/lib/Transforms/Utils/CloneModule.cpp index 82f5b93..f605636 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(ValueMap[I]); if (I->hasInitializer()) GV->setInitializer(cast(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(ValueMap[I]); GA->setLinkage(I->getLinkage()); if (const Constant* C = I->getAliasee()) - GA->setAliasee(cast(MapValue(C, ValueMap))); + GA->setAliasee(cast(MapValue(C, ValueMap, &M->getContext()))); } return New; -- cgit v1.1