[llvm] r266493 - Linker: Remove an unnecessary local variable in for loop, NFC
Duncan P. N. Exon Smith via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 15 16:32:47 PDT 2016
Author: dexonsmith
Date: Fri Apr 15 18:32:44 2016
New Revision: 266493
URL: http://llvm.org/viewvc/llvm-project?rev=266493&view=rev
Log:
Linker: Remove an unnecessary local variable in for loop, NFC
Reduces changes in a follow-up commit.
Modified:
llvm/trunk/lib/Linker/IRMover.cpp
Modified: llvm/trunk/lib/Linker/IRMover.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Linker/IRMover.cpp?rev=266493&r1=266492&r2=266493&view=diff
==============================================================================
--- llvm/trunk/lib/Linker/IRMover.cpp (original)
+++ llvm/trunk/lib/Linker/IRMover.cpp Fri Apr 15 18:32:44 2016
@@ -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));
}
}
More information about the llvm-commits
mailing list