summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorMatthijs Kooijman <matthijs@stdin.nl>2008-10-13 12:41:46 +0000
committerMatthijs Kooijman <matthijs@stdin.nl>2008-10-13 12:41:46 +0000
commit43686a666543578ef56f6b7907d5c0799e4214b9 (patch)
tree8f0d544247f5dc4ca630683e772fbe298387464e /llvm/lib/CodeGen
parentc8d7988da8522afe5cf373b0965b79e8879a8b05 (diff)
downloadbcm5719-llvm-43686a666543578ef56f6b7907d5c0799e4214b9.tar.gz
bcm5719-llvm-43686a666543578ef56f6b7907d5c0799e4214b9.zip
* Make TargetLowering not crash when TargetMachine::getTargetAsmInfo() returns
null. This assumes that any target that does not have AsmInfo, does not support "LocAndDot". llvm-svn: 57438
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp b/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
index 7e17daaa0f6..05edb6348d6 100644
--- a/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
+++ b/llvm/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);
}
OpenPOWER on IntegriCloud