* 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
This commit is contained in:
parent
c8d7988da8
commit
43686a6665
|
@ -473,7 +473,8 @@ TargetLowering::TargetLowering(TargetMachine &tm)
|
||||||
InitCmpLibcallCCs(CmpLibcallCCs);
|
InitCmpLibcallCCs(CmpLibcallCCs);
|
||||||
|
|
||||||
// Tell Legalize whether the assembler supports DEBUG_LOC.
|
// 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);
|
setOperationAction(ISD::DEBUG_LOC, MVT::Other, Expand);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue