Skip to content

Commit a30006f

Browse files
Revert "Revert "[InstrRef][NFC] Delete unused variables (llvm#75501)""
This reverts commit f79eeb6.
1 parent 49c2c1f commit a30006f

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1402,16 +1402,9 @@ bool InstrRefBasedLDV::transferDebugValue(const MachineInstr &MI) {
14021402
if (!MI.isDebugValue())
14031403
return false;
14041404

1405-
const DILocalVariable *Var = MI.getDebugVariable();
1406-
const DIExpression *Expr = MI.getDebugExpression();
1407-
const DILocation *DebugLoc = MI.getDebugLoc();
1408-
const DILocation *InlinedAt = DebugLoc->getInlinedAt();
1409-
assert(Var->isValidLocationForIntrinsic(DebugLoc) &&
1405+
assert(MI.getDebugVariable()->isValidLocationForIntrinsic(MI.getDebugLoc()) &&
14101406
"Expected inlined-at fields to agree");
14111407

1412-
DebugVariable V(Var, Expr, InlinedAt);
1413-
DbgValueProperties Properties(MI);
1414-
14151408
// If there are no instructions in this lexical scope, do no location tracking
14161409
// at all, this variable shouldn't get a legitimate location range.
14171410
auto *Scope = LS.findLexicalScope(MI.getDebugLoc().get());
@@ -1462,7 +1455,7 @@ bool InstrRefBasedLDV::transferDebugValue(const MachineInstr &MI) {
14621455
}
14631456
}
14641457
}
1465-
VTracker->defVar(MI, Properties, DebugOps);
1458+
VTracker->defVar(MI, DbgValueProperties(MI), DebugOps);
14661459
}
14671460

14681461
// If performing final tracking of transfers, report this variable definition

0 commit comments

Comments
 (0)