Skip to content

Commit da2db4a

Browse files
[InstrRef][NFC] Delete unused variables (llvm#75501)
`V` was unused, and all the other deletions follow from that observation.
1 parent a6f6dd1 commit da2db4a

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
@@ -1375,16 +1375,9 @@ bool InstrRefBasedLDV::transferDebugValue(const MachineInstr &MI) {
13751375
if (!MI.isDebugValue())
13761376
return false;
13771377

1378-
const DILocalVariable *Var = MI.getDebugVariable();
1379-
const DIExpression *Expr = MI.getDebugExpression();
1380-
const DILocation *DebugLoc = MI.getDebugLoc();
1381-
const DILocation *InlinedAt = DebugLoc->getInlinedAt();
1382-
assert(Var->isValidLocationForIntrinsic(DebugLoc) &&
1378+
assert(MI.getDebugVariable()->isValidLocationForIntrinsic(MI.getDebugLoc()) &&
13831379
"Expected inlined-at fields to agree");
13841380

1385-
DebugVariable V(Var, Expr, InlinedAt);
1386-
DbgValueProperties Properties(MI);
1387-
13881381
// If there are no instructions in this lexical scope, do no location tracking
13891382
// at all, this variable shouldn't get a legitimate location range.
13901383
auto *Scope = LS.findLexicalScope(MI.getDebugLoc().get());
@@ -1417,7 +1410,7 @@ bool InstrRefBasedLDV::transferDebugValue(const MachineInstr &MI) {
14171410
}
14181411
}
14191412
}
1420-
VTracker->defVar(MI, Properties, DebugOps);
1413+
VTracker->defVar(MI, DbgValueProperties(MI), DebugOps);
14211414
}
14221415

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

0 commit comments

Comments
 (0)