From ef41a1ce3cbfb6f092ee6b3d540c29a278abbe2a Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Sat, 24 Oct 2009 23:37:16 +0000 Subject: MapValue doesn't needs its LLVMContext argument. llvm-svn: 85020 --- llvm/lib/Transforms/Utils/CloneModule.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'llvm/lib/Transforms/Utils/CloneModule.cpp') 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(ValueMap[I]); if (I->hasInitializer()) GV->setInitializer(cast(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(ValueMap[I]); GA->setLinkage(I->getLinkage()); if (const Constant* C = I->getAliasee()) - GA->setAliasee(cast(MapValue(C, ValueMap, M->getContext()))); + GA->setAliasee(cast(MapValue(C, ValueMap))); } return New; -- cgit v1.2.3