Changeset View
Changeset View
Standalone View
Standalone View
llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
Show First 20 Lines • Show All 241 Lines • ▼ Show 20 Lines | |||||
void AsmPrinter::EmitToStreamer(MCStreamer &S, const MCInst &Inst) { | void AsmPrinter::EmitToStreamer(MCStreamer &S, const MCInst &Inst) { | ||||
S.emitInstruction(Inst, getSubtargetInfo()); | S.emitInstruction(Inst, getSubtargetInfo()); | ||||
} | } | ||||
void AsmPrinter::emitInitialRawDwarfLocDirective(const MachineFunction &MF) { | void AsmPrinter::emitInitialRawDwarfLocDirective(const MachineFunction &MF) { | ||||
if (DD) { | if (DD) { | ||||
assert(OutStreamer->hasRawTextSupport() && | assert(OutStreamer->hasRawTextSupport() && | ||||
"Expected assembly output mode."); | "Expected assembly output mode."); | ||||
// This is NVPTX specific and it's unclear why. | |||||
// PR51079: If we have code without debug information we need to give up. | |||||
DISubprogram *MFSP = MF.getFunction().getSubprogram(); | |||||
if (!MFSP) | |||||
return; | |||||
(void)DD->emitInitialLocDirective(MF, /*CUID=*/0); | (void)DD->emitInitialLocDirective(MF, /*CUID=*/0); | ||||
} | } | ||||
} | } | ||||
/// getCurrentSection() - Return the current section we are emitting to. | /// getCurrentSection() - Return the current section we are emitting to. | ||||
const MCSection *AsmPrinter::getCurrentSection() const { | const MCSection *AsmPrinter::getCurrentSection() const { | ||||
return OutStreamer->getCurrentSectionOnly(); | return OutStreamer->getCurrentSectionOnly(); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 3,404 Lines • Show Last 20 Lines |