[llvm-commits] [llvm] r78154 - /llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp

Chris Lattner sabre at nondot.org
Tue Aug 4 21:09:32 PDT 2009


Author: lattner
Date: Tue Aug  4 23:09:18 2009
New Revision: 78154

URL: http://llvm.org/viewvc/llvm-project?rev=78154&view=rev
Log:
add a temporary hook to allow reuse of the asmprinter from the disassembler.

Modified:
    llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp

Modified: llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp?rev=78154&r1=78153&r2=78154&view=diff

==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp Tue Aug  4 23:09:18 2009
@@ -1319,6 +1319,9 @@
 /// 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);





More information about the llvm-commits mailing list