ValueMapper: Reuse local variable, NFC
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>
Mon, 3 Aug 2015 03:24:28 +0000 (03:24 +0000)
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>
Mon, 3 Aug 2015 03:24:28 +0000 (03:24 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243864 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/Utils/ValueMapper.cpp

index 8c72641da9e7a7fbb3ce15ce7fe466009868e00a..3c6e1bddd9a4817ed2f79860727a7cedc6b3a28b 100644 (file)
@@ -205,8 +205,8 @@ static bool remap(const MDNode *OldNode, MDNode *NewNode,
     assert(NewNode->getOperand(I) == Old &&
            "Expected old operands to already be in place");
 
-    Metadata *New = mapMetadataOp(OldNode->getOperand(I), Cycles, VM, Flags,
-                                  TypeMapper, Materializer);
+    Metadata *New =
+        mapMetadataOp(Old, Cycles, VM, Flags, TypeMapper, Materializer);
     if (Old != New) {
       AnyChanged = true;
       NewNode->replaceOperandWith(I, New);