MapValue doesn't needs its LLVMContext argument.
[oota-llvm.git] / lib / Transforms / Utils / CloneModule.cpp
index 0285f8c8d107b052adc5e7daad7a01f15642bc30..a163f89cc37f5de10820256a23593e4eb979d088 100644 (file)
@@ -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;