aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/AssignmentTrackingAnalysis.cpp
diff options
context:
space:
mode:
authorAkshay Khadse <akshayskhadse@gmail.com>2023-03-24 17:14:30 +0800
committerLuo, Yuanke <yuanke.luo@intel.com>2023-03-24 17:29:48 +0800
commit0c36ab19081fd45d2894ada7b6d2852161a4310f (patch)
treebce1cfc700a3e900ae981150a41d560ed68281ba /llvm/lib/CodeGen/AssignmentTrackingAnalysis.cpp
parentb94175b0ee5712cab8302ac62854106b82d3be08 (diff)
downloadllvm-0c36ab19081fd45d2894ada7b6d2852161a4310f.zip
llvm-0c36ab19081fd45d2894ada7b6d2852161a4310f.tar.gz
llvm-0c36ab19081fd45d2894ada7b6d2852161a4310f.tar.bz2
[NFC] Fix auto usage to avoid copies
Fixes some usages of the "auto" keyword to avoid creation of copies. Reviewed By: LuoYuanke Differential Revision: https://reviews.llvm.org/D146694
Diffstat (limited to 'llvm/lib/CodeGen/AssignmentTrackingAnalysis.cpp')
-rw-r--r--llvm/lib/CodeGen/AssignmentTrackingAnalysis.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/AssignmentTrackingAnalysis.cpp b/llvm/lib/CodeGen/AssignmentTrackingAnalysis.cpp
index 8b0ab67c..e438241 100644
--- a/llvm/lib/CodeGen/AssignmentTrackingAnalysis.cpp
+++ b/llvm/lib/CodeGen/AssignmentTrackingAnalysis.cpp
@@ -854,15 +854,15 @@ public:
}
// 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);