diff --git a/llvm/lib/Transforms/IPO/DeadArgumentElimination.cpp b/llvm/lib/Transforms/IPO/DeadArgumentElimination.cpp --- a/llvm/lib/Transforms/IPO/DeadArgumentElimination.cpp +++ b/llvm/lib/Transforms/IPO/DeadArgumentElimination.cpp @@ -238,8 +238,8 @@ // Clone metadata from the old function, including debug info descriptor. SmallVector, 1> MDs; F.getAllMetadata(MDs); - for (auto MD : MDs) - NF->addMetadata(MD.first, *MD.second); + for (auto [KindID, Node] : MDs) + NF->addMetadata(KindID, *Node); // Fix up any BlockAddresses that refer to the function. F.replaceAllUsesWith(ConstantExpr::getBitCast(NF, F.getType())); @@ -1062,8 +1062,8 @@ // Clone metadata from the old function, including debug info descriptor. SmallVector, 1> MDs; F->getAllMetadata(MDs); - for (auto MD : MDs) - NF->addMetadata(MD.first, *MD.second); + for (auto [KindID, Node] : MDs) + NF->addMetadata(KindID, *Node); // If either the return value(s) or argument(s) are removed, then probably the // function does not follow standard calling conventions anymore. Hence, add