diff --git a/llvm/lib/CodeGen/SelectionDAG/InstrEmitter.cpp b/llvm/lib/CodeGen/SelectionDAG/InstrEmitter.cpp index dbf0f8a421768..373aa11663bf5 100644 --- a/llvm/lib/CodeGen/SelectionDAG/InstrEmitter.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/InstrEmitter.cpp @@ -677,15 +677,15 @@ void InstrEmitter::EmitRegSequence(SDNode *Node, MachineInstr * InstrEmitter::EmitDbgValue(SDDbgValue *SD, DenseMap &VRBaseMap) { - MDNode *Var = SD->getVariable(); DebugLoc DL = SD->getDebugLoc(); - assert(cast(Var)->isValidLocationForIntrinsic(DL) && + assert(cast(SD->getVariable()) + ->isValidLocationForIntrinsic(DL) && "Expected inlined-at fields to agree"); SD->setIsEmitted(); - ArrayRef LocationOps = SD->getLocationOps(); - assert(!LocationOps.empty() && "dbg_value with no location operands?"); + assert(!SD->getLocationOps().empty() && + "dbg_value with no location operands?"); if (SD->isInvalidated()) return EmitDbgNoLocation(SD);