diff --git a/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp b/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp index ef9f783355190..e255bbaa92b16 100644 --- a/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp @@ -1203,11 +1203,6 @@ void FastISel::handleDbgInfo(const Instruction *II) { if (DbgLabelRecord *DLR = dyn_cast(&DR)) { assert(DLR->getLabel() && "Missing label"); - if (!FuncInfo.MF->getMMI().hasDebugInfo()) { - LLVM_DEBUG(dbgs() << "Dropping debug info for " << *DLR << "\n"); - continue; - } - BuildMI(*FuncInfo.MBB, FuncInfo.InsertPt, DLR->getDebugLoc(), TII.get(TargetOpcode::DBG_LABEL)) .addMetadata(DLR->getLabel()); @@ -1402,12 +1397,6 @@ bool FastISel::selectIntrinsicCall(const IntrinsicInst *II) { case Intrinsic::dbg_declare: { const DbgDeclareInst *DI = cast(II); assert(DI->getVariable() && "Missing variable"); - if (!FuncInfo.MF->getMMI().hasDebugInfo()) { - LLVM_DEBUG(dbgs() << "Dropping debug info for " << *DI - << " (!hasDebugInfo)\n"); - return true; - } - if (FuncInfo.PreprocessedDbgDeclares.contains(DI)) return true; @@ -1446,11 +1435,6 @@ bool FastISel::selectIntrinsicCall(const IntrinsicInst *II) { case Intrinsic::dbg_label: { const DbgLabelInst *DI = cast(II); assert(DI->getLabel() && "Missing label"); - if (!FuncInfo.MF->getMMI().hasDebugInfo()) { - LLVM_DEBUG(dbgs() << "Dropping debug info for " << *DI << "\n"); - return true; - } - BuildMI(*FuncInfo.MBB, FuncInfo.InsertPt, MIMD, TII.get(TargetOpcode::DBG_LABEL)).addMetadata(DI->getLabel()); return true;