Skip to content

Commit 05d722a

Browse files
committed
[llvm] Fix an "unused variable" warning when assertions are disabled
1 parent 90b5afe commit 05d722a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

llvm/lib/CodeGen/SelectionDAG/InstrEmitter.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -677,15 +677,15 @@ void InstrEmitter::EmitRegSequence(SDNode *Node,
677677
MachineInstr *
678678
InstrEmitter::EmitDbgValue(SDDbgValue *SD,
679679
DenseMap<SDValue, Register> &VRBaseMap) {
680-
MDNode *Var = SD->getVariable();
681680
DebugLoc DL = SD->getDebugLoc();
682-
assert(cast<DILocalVariable>(Var)->isValidLocationForIntrinsic(DL) &&
681+
assert(cast<DILocalVariable>(SD->getVariable())
682+
->isValidLocationForIntrinsic(DL) &&
683683
"Expected inlined-at fields to agree");
684684

685685
SD->setIsEmitted();
686686

687-
ArrayRef<SDDbgOperand> LocationOps = SD->getLocationOps();
688-
assert(!LocationOps.empty() && "dbg_value with no location operands?");
687+
assert(!SD->getLocationOps().empty() &&
688+
"dbg_value with no location operands?");
689689

690690
if (SD->isInvalidated())
691691
return EmitDbgNoLocation(SD);

0 commit comments

Comments
 (0)