Linker: Remove an unnecessary local variable in for loop, NFC

Reduces changes in a follow-up commit.

llvm-svn: 266493
This commit is contained in:
Duncan P. N. Exon Smith 2016-04-15 23:32:44 +00:00
parent 8517c8e81d
commit 8a15dab391
1 changed files with 4 additions and 6 deletions

View File

@ -999,12 +999,10 @@ void IRLinker::linkNamedMDNodes() {
continue;
NamedMDNode *DestNMD = DstM.getOrInsertNamedMetadata(NMD.getName());
// Add Src elements into Dest node.
for (const MDNode *op : NMD.operands()) {
MDNode *DestMD = MapMetadata(
op, ValueMap, ValueMapperFlags | RF_NullMapMissingGlobalValues,
&TypeMap, &GValMaterializer);
DestNMD->addOperand(DestMD);
}
for (const MDNode *Op : NMD.operands())
DestNMD->addOperand(MapMetadata(
Op, ValueMap, ValueMapperFlags | RF_NullMapMissingGlobalValues,
&TypeMap, &GValMaterializer));
}
}