summaryrefslogtreecommitdiff
path: root/lib/Linker
diff options
context:
space:
mode:
authorRoman Divacky <rdivacky@FreeBSD.org>2010-01-01 10:31:22 +0000
committerRoman Divacky <rdivacky@FreeBSD.org>2010-01-01 10:31:22 +0000
commit1e7804dbd25b8dbf534c850355d70ad215206f4b (patch)
treedba00119388b84f9f44e6ec5e9129f807fd79ca3 /lib/Linker
parent571945e6affd20b19264ec22495da418d0fbdbb4 (diff)
downloadsrc-test2-1e7804dbd25b8dbf534c850355d70ad215206f4b.tar.gz
src-test2-1e7804dbd25b8dbf534c850355d70ad215206f4b.zip
Notes
Diffstat (limited to 'lib/Linker')
-rw-r--r--lib/Linker/LinkModules.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/Linker/LinkModules.cpp b/lib/Linker/LinkModules.cpp
index 8ece835bfe77..104cbe9405d4 100644
--- a/lib/Linker/LinkModules.cpp
+++ b/lib/Linker/LinkModules.cpp
@@ -538,8 +538,8 @@ static void LinkNamedMDNodes(Module *Dest, Module *Src) {
NamedMDNode::Create(SrcNMD, Dest);
else {
// Add Src elements into Dest node.
- for (unsigned i = 0, e = SrcNMD->getNumElements(); i != e; ++i)
- DestNMD->addElement(SrcNMD->getElement(i));
+ for (unsigned i = 0, e = SrcNMD->getNumOperands(); i != e; ++i)
+ DestNMD->addOperand(SrcNMD->getOperand(i));
}
}
}
@@ -664,7 +664,6 @@ static bool LinkGlobals(Module *Dest, const Module *Src,
Var->eraseFromParent();
else
cast<Function>(DGV)->eraseFromParent();
- DGV = NewDGV;
// If the symbol table renamed the global, but it is an externally visible
// symbol, DGV must be an existing global with internal linkage. Rename.