aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/LiveDebugValues/VarLocBasedImpl.cpp
diff options
context:
space:
mode:
authorLuo, Yuanke <yuanke.luo@intel.com>2023-05-05 09:50:19 +0800
committerLuo, Yuanke <yuanke.luo@intel.com>2023-05-05 09:50:38 +0800
commitae1ca47bb4456c97e112b10364c65102ffe31cd0 (patch)
tree6de64beb99a49f7dadc5892c6195f89b58282822 /llvm/lib/CodeGen/LiveDebugValues/VarLocBasedImpl.cpp
parent2e3cabe172c6f2eaf1f097ffeff1664b3768223a (diff)
downloadllvm-ae1ca47bb4456c97e112b10364c65102ffe31cd0.zip
llvm-ae1ca47bb4456c97e112b10364c65102ffe31cd0.tar.gz
llvm-ae1ca47bb4456c97e112b10364c65102ffe31cd0.tar.bz2
[Coverity] Big parameter passed by value.
Diffstat (limited to 'llvm/lib/CodeGen/LiveDebugValues/VarLocBasedImpl.cpp')
-rw-r--r--llvm/lib/CodeGen/LiveDebugValues/VarLocBasedImpl.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/LiveDebugValues/VarLocBasedImpl.cpp b/llvm/lib/CodeGen/LiveDebugValues/VarLocBasedImpl.cpp
index 959fea6..c5942ae 100644
--- a/llvm/lib/CodeGen/LiveDebugValues/VarLocBasedImpl.cpp
+++ b/llvm/lib/CodeGen/LiveDebugValues/VarLocBasedImpl.cpp
@@ -1116,7 +1116,7 @@ VarLocBasedLDV::~VarLocBasedLDV() = default;
/// location, erase the variable from the Vars set.
void VarLocBasedLDV::OpenRangesSet::erase(const VarLoc &VL) {
// Erasure helper.
- auto DoErase = [VL, this](DebugVariable VarToErase) {
+ auto DoErase = [&VL, this](DebugVariable VarToErase) {
auto *EraseFrom = VL.isEntryBackupLoc() ? &EntryValuesBackupVars : &Vars;
auto It = EraseFrom->find(VarToErase);
if (It != EraseFrom->end()) {