From d250329291dd9fe0d5f0e72e6cf1e287558a7cba Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Wed, 5 Aug 2009 04:09:18 +0000 Subject: [PATCH] add a temporary hook to allow reuse of the asmprinter from the disassembler. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78154 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/AsmPrinter/AsmPrinter.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp index 1de31bbc795..69bc5edf372 100644 --- a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp +++ b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp @@ -1319,6 +1319,9 @@ void AsmPrinter::PrintSpecial(const MachineInstr *MI, const char *Code) const { /// processDebugLoc - Processes the debug information of each machine /// instruction's DebugLoc. void AsmPrinter::processDebugLoc(DebugLoc DL) { + if (!TAI || !DW) + return; + if (TAI->doesSupportDebugInformation() && DW->ShouldEmitDwarfDebug()) { if (!DL.isUnknown()) { DebugLocTuple CurDLT = MF->getDebugLocTuple(DL); -- 2.34.1