Do not pass a copy of the value map, pass a reference to it.

llvm-svn: 109852
This commit is contained in:
Duncan Sands 2010-07-30 05:50:45 +00:00
parent 57ab333302
commit 07cc85fd7c

View File

@ -199,7 +199,7 @@ static Constant *GetTorInit(std::vector<std::pair<Function*, int> > &TorList) {
/// static ctors/dtors, we need to add an llvm.global_[cd]tors global to M2, and
/// prune appropriate entries out of M1s list.
static void SplitStaticCtorDtor(const char *GlobalName, Module *M1, Module *M2,
ValueMap<const Value*, Value*> VMap) {
ValueMap<const Value*, Value*> &VMap) {
GlobalVariable *GV = M1->getNamedGlobal(GlobalName);
if (!GV || GV->isDeclaration() || GV->hasLocalLinkage() ||
!GV->use_empty()) return;