[llvm-commits] [llvm] r57438 - /llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp

Matthijs Kooijman matthijs at stdin.nl
Mon Oct 13 05:41:48 PDT 2008


Author: matthijs
Date: Mon Oct 13 07:41:46 2008
New Revision: 57438

URL: http://llvm.org/viewvc/llvm-project?rev=57438&view=rev
Log:
 * Make TargetLowering not crash when TargetMachine::getTargetAsmInfo() returns
   null. This assumes that any target that does not have AsmInfo, does not
   support "LocAndDot".

Modified:
    llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp

Modified: llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp?rev=57438&r1=57437&r2=57438&view=diff

==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp Mon Oct 13 07:41:46 2008
@@ -473,7 +473,8 @@
   InitCmpLibcallCCs(CmpLibcallCCs);
 
   // Tell Legalize whether the assembler supports DEBUG_LOC.
-  if (!TM.getTargetAsmInfo()->hasDotLocAndDotFile())
+  const TargetAsmInfo *TASM = TM.getTargetAsmInfo();
+  if (!TASM || !TASM->hasDotLocAndDotFile())
     setOperationAction(ISD::DEBUG_LOC, MVT::Other, Expand);
 }
 





More information about the llvm-commits mailing list