summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorJim Laskey <jlaskey@mac.com>2006-03-26 22:46:27 +0000
committerJim Laskey <jlaskey@mac.com>2006-03-26 22:46:27 +0000
commit7092888bccaef33f7fa5afef0148b2bea5d07453 (patch)
treec5869876aeefa259ec5638634b88035cbf202a2d /llvm/lib/CodeGen
parent84c2f0a705eb3d5ecc5a9332d2eece4c12ee94f4 (diff)
downloadbcm5719-llvm-7092888bccaef33f7fa5afef0148b2bea5d07453.tar.gz
bcm5719-llvm-7092888bccaef33f7fa5afef0148b2bea5d07453.zip
Bullet proof against undefined args produced by upgrading ols-style debug info.
llvm-svn: 27155
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
index 0cd91ad5720..f6fb089789c 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
@@ -1114,7 +1114,7 @@ SelectionDAGLowering::visitIntrinsicCall(CallInst &I, unsigned Intrinsic) {
case Intrinsic::dbg_stoppoint: {
MachineDebugInfo *DebugInfo = DAG.getMachineDebugInfo();
DbgStopPointInst &SPI = cast<DbgStopPointInst>(I);
- if (DebugInfo && DebugInfo->Verify(SPI.getContext())) {
+ if (DebugInfo && SPI.getContext() && DebugInfo->Verify(SPI.getContext())) {
std::vector<SDOperand> Ops;
Ops.push_back(getRoot());
@@ -1136,7 +1136,7 @@ SelectionDAGLowering::visitIntrinsicCall(CallInst &I, unsigned Intrinsic) {
case Intrinsic::dbg_region_start: {
MachineDebugInfo *DebugInfo = DAG.getMachineDebugInfo();
DbgRegionStartInst &RSI = cast<DbgRegionStartInst>(I);
- if (DebugInfo && DebugInfo->Verify(RSI.getContext())) {
+ if (DebugInfo && RSI.getContext() && DebugInfo->Verify(RSI.getContext())) {
std::vector<SDOperand> Ops;
unsigned LabelID = DebugInfo->RecordRegionStart(RSI.getContext());
@@ -1152,7 +1152,7 @@ SelectionDAGLowering::visitIntrinsicCall(CallInst &I, unsigned Intrinsic) {
case Intrinsic::dbg_region_end: {
MachineDebugInfo *DebugInfo = DAG.getMachineDebugInfo();
DbgRegionEndInst &REI = cast<DbgRegionEndInst>(I);
- if (DebugInfo && DebugInfo->Verify(REI.getContext())) {
+ if (DebugInfo && REI.getContext() && DebugInfo->Verify(REI.getContext())) {
std::vector<SDOperand> Ops;
unsigned LabelID = DebugInfo->RecordRegionEnd(REI.getContext());
@@ -1168,7 +1168,8 @@ SelectionDAGLowering::visitIntrinsicCall(CallInst &I, unsigned Intrinsic) {
case Intrinsic::dbg_func_start: {
MachineDebugInfo *DebugInfo = DAG.getMachineDebugInfo();
DbgFuncStartInst &FSI = cast<DbgFuncStartInst>(I);
- if (DebugInfo && DebugInfo->Verify(FSI.getSubprogram())) {
+ if (DebugInfo && FSI.getSubprogram() &&
+ DebugInfo->Verify(FSI.getSubprogram())) {
std::vector<SDOperand> Ops;
unsigned LabelID = DebugInfo->RecordRegionStart(FSI.getSubprogram());
OpenPOWER on IntegriCloud