diff options
Diffstat (limited to 'contrib/llvm-project/llvm/lib/Transforms/Utils/MemoryOpRemark.cpp')
-rw-r--r-- | contrib/llvm-project/llvm/lib/Transforms/Utils/MemoryOpRemark.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/contrib/llvm-project/llvm/lib/Transforms/Utils/MemoryOpRemark.cpp b/contrib/llvm-project/llvm/lib/Transforms/Utils/MemoryOpRemark.cpp index 47c6bcbaf26e..d671a9373bf0 100644 --- a/contrib/llvm-project/llvm/lib/Transforms/Utils/MemoryOpRemark.cpp +++ b/contrib/llvm-project/llvm/lib/Transforms/Utils/MemoryOpRemark.cpp @@ -321,9 +321,6 @@ void MemoryOpRemark::visitVariable(const Value *V, bool FoundDI = false; // Try to get an llvm.dbg.declare, which has a DILocalVariable giving us the // real debug info name and size of the variable. - SmallVector<DbgDeclareInst *, 1> DbgDeclares; - SmallVector<DPValue *, 1> DPValues; - findDbgDeclares(DbgDeclares, const_cast<Value *>(V), &DPValues); auto FindDI = [&](const auto *DVI) { if (DILocalVariable *DILV = DVI->getVariable()) { std::optional<uint64_t> DISize = getSizeInBytes(DILV->getSizeInBits()); @@ -334,8 +331,8 @@ void MemoryOpRemark::visitVariable(const Value *V, } } }; - for_each(DbgDeclares, FindDI); - for_each(DPValues, FindDI); + for_each(findDbgDeclares(const_cast<Value *>(V)), FindDI); + for_each(findDPVDeclares(const_cast<Value *>(V)), FindDI); if (FoundDI) { assert(!Result.empty()); |