[PATCH] D133026: [DeadArgElim] Use structure bindings in foreach loops. NFC
Pavel Samolysov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 1 03:49:02 PDT 2022
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG527b9a9d908f: [DeadArgElim] Use structure bindings in foreach loops. NFC (authored by psamolysov).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D133026/new/
https://reviews.llvm.org/D133026
Files:
llvm/lib/Transforms/IPO/DeadArgumentElimination.cpp
Index: llvm/lib/Transforms/IPO/DeadArgumentElimination.cpp
===================================================================
--- llvm/lib/Transforms/IPO/DeadArgumentElimination.cpp
+++ llvm/lib/Transforms/IPO/DeadArgumentElimination.cpp
@@ -238,8 +238,8 @@
// Clone metadata from the old function, including debug info descriptor.
SmallVector<std::pair<unsigned, MDNode *>, 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<std::pair<unsigned, MDNode *>, 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D133026.457222.patch
Type: text/x-patch
Size: 1168 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220901/f4077aa0/attachment.bin>
More information about the llvm-commits
mailing list