diff options
author | Matthijs Kooijman <matthijs@stdin.nl> | 2008-10-13 12:41:46 +0000 |
---|---|---|
committer | Matthijs Kooijman <matthijs@stdin.nl> | 2008-10-13 12:41:46 +0000 |
commit | d9d07780ff0d393a34cbd57cd2b85bdd8c947a04 (patch) | |
tree | c020e5881e66fe81ce732e796a4c439acf99936b /lib/CodeGen/SelectionDAG/TargetLowering.cpp | |
parent | e2b997b7b5360b4793c524a801e988fd37b80b93 (diff) |
* Make TargetLowering not crash when TargetMachine::getTargetAsmInfo() returns
null. This assumes that any target that does not have AsmInfo, does not
support "LocAndDot".
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57438 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/TargetLowering.cpp')
-rw-r--r-- | lib/CodeGen/SelectionDAG/TargetLowering.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/CodeGen/SelectionDAG/TargetLowering.cpp b/lib/CodeGen/SelectionDAG/TargetLowering.cpp index 7e17daaa0f..05edb6348d 100644 --- a/lib/CodeGen/SelectionDAG/TargetLowering.cpp +++ b/lib/CodeGen/SelectionDAG/TargetLowering.cpp @@ -473,7 +473,8 @@ TargetLowering::TargetLowering(TargetMachine &tm) 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); } |