[PATCH] D146694: [NFC] Fix auto usage to avoid copies
LuoYuanke via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 24 02:29:59 PDT 2023
This revision was automatically updated to reflect the committed changes.
Closed by commit rG0c36ab19081f: [NFC] Fix auto usage to avoid copies (authored by akshaykhadse, committed by LuoYuanke).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D146694/new/
https://reviews.llvm.org/D146694
Files:
llvm/lib/CodeGen/AssignmentTrackingAnalysis.cpp
Index: llvm/lib/CodeGen/AssignmentTrackingAnalysis.cpp
===================================================================
--- llvm/lib/CodeGen/AssignmentTrackingAnalysis.cpp
+++ llvm/lib/CodeGen/AssignmentTrackingAnalysis.cpp
@@ -854,15 +854,15 @@
}
// Insert new location defs.
- for (auto Pair : BBInsertBeforeMap) {
+ for (auto &Pair : BBInsertBeforeMap) {
InsertMap &Map = Pair.second;
- for (auto Pair : Map) {
+ for (auto &Pair : Map) {
Instruction *InsertBefore = Pair.first;
assert(InsertBefore && "should never be null");
auto FragMemLocs = Pair.second;
auto &Ctx = Fn.getContext();
- for (auto FragMemLoc : FragMemLocs) {
+ for (auto &FragMemLoc : FragMemLocs) {
DIExpression *Expr = DIExpression::get(Ctx, std::nullopt);
Expr = *DIExpression::createFragmentExpression(
Expr, FragMemLoc.OffsetInBits, FragMemLoc.SizeInBits);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D146694.508010.patch
Type: text/x-patch
Size: 960 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230324/0d5fc4fa/attachment.bin>
More information about the llvm-commits
mailing list