aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
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
commitfbcf23c3c12449c264f1448a2eee524be0b799f7 (patch)
treedd62fcdbb882dbeb0a4a18ecee422da54234ab60 /lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
parent98e0410f078185d54195d2594be3cb96e6e8ab5d (diff)
Bullet proof against undefined args produced by upgrading ols-style debug info.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27155 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp')
-rw-r--r--lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
index 0cd91ad572..f6fb089789 100644
--- a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
+++ b/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());