diff options
author | Kazu Hirata <kazu@google.com> | 2025-03-23 21:20:44 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-03-23 21:20:44 -0700 |
commit | 1019457891fda0b2f32f50ba99d6a261df12ec08 (patch) | |
tree | 89e9b2ecba96f909114262f417749d6dc216562b /llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp | |
parent | 054e0b41a8a997c6f7cf24c57d6dbe2dcfb2c3be (diff) | |
download | llvm-1019457891fda0b2f32f50ba99d6a261df12ec08.zip llvm-1019457891fda0b2f32f50ba99d6a261df12ec08.tar.gz llvm-1019457891fda0b2f32f50ba99d6a261df12ec08.tar.bz2 |
[CodeGen] Use *Set::insert_range (NFC) (#132651)
We can use *Set::insert_range to collapse:
for (auto Elem : Range)
Set.insert(E);
down to:
Set.insert_range(Range);
Diffstat (limited to 'llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp')
-rw-r--r-- | llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp b/llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp index fb688a2..9f11ccf 100644 --- a/llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp +++ b/llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp @@ -900,8 +900,7 @@ public: // Commit ActiveMLoc changes. ActiveMLocIt->second.clear(); if (!NewMLocs.empty()) - for (DebugVariableID VarID : NewMLocs) - ActiveMLocs[*NewLoc].insert(VarID); + ActiveMLocs[*NewLoc].insert_range(NewMLocs); } /// Transfer variables based on \p Src to be based on \p Dst. This handles |