From: Chris Lattner Date: Wed, 5 Aug 2009 04:09:18 +0000 (+0000) Subject: add a temporary hook to allow reuse of the asmprinter from the disassembler. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=d250329291dd9fe0d5f0e72e6cf1e287558a7cba;p=oota-llvm.git 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 --- 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);