add a temporary hook to allow reuse of the asmprinter from the disassembler.
authorChris Lattner <sabre@nondot.org>
Wed, 5 Aug 2009 04:09:18 +0000 (04:09 +0000)
committerChris Lattner <sabre@nondot.org>
Wed, 5 Aug 2009 04:09:18 +0000 (04:09 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78154 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/AsmPrinter/AsmPrinter.cpp

index 1de31bbc795b5a02e4a339ed057d5f4af8175dd1..69bc5edf3721e25e558ea1d88a59e983233592ff 100644 (file)
@@ -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);