File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
llvm/lib/Transforms/Utils Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -322,8 +322,9 @@ void MemoryOpRemark::visitVariable(const Value *V,
322
322
// Try to get an llvm.dbg.declare, which has a DILocalVariable giving us the
323
323
// real debug info name and size of the variable.
324
324
SmallVector<DbgDeclareInst *, 1 > DbgDeclares;
325
- findDbgDeclares (DbgDeclares, const_cast <Value *>(V));
326
- for (const DbgVariableIntrinsic *DVI : DbgDeclares) {
325
+ SmallVector<DPValue *, 1 > DPValues;
326
+ findDbgDeclares (DbgDeclares, const_cast <Value *>(V), &DPValues);
327
+ auto FindDI = [&](const auto *DVI) {
327
328
if (DILocalVariable *DILV = DVI->getVariable ()) {
328
329
std::optional<uint64_t > DISize = getSizeInBytes (DILV->getSizeInBits ());
329
330
VariableInfo Var{DILV->getName (), DISize};
@@ -332,7 +333,10 @@ void MemoryOpRemark::visitVariable(const Value *V,
332
333
FoundDI = true ;
333
334
}
334
335
}
335
- }
336
+ };
337
+ for_each (DbgDeclares, FindDI);
338
+ for_each (DPValues, FindDI);
339
+
336
340
if (FoundDI) {
337
341
assert (!Result.empty ());
338
342
return ;
You can’t perform that action at this time.
0 commit comments