diff options
| author | Dale Johannesen <dalej@apple.com> | 2008-04-04 23:48:31 +0000 |
|---|---|---|
| committer | Dale Johannesen <dalej@apple.com> | 2008-04-04 23:48:31 +0000 |
| commit | 0ce4a7cc4440f1f66d91ad61057790eb196f2e4a (patch) | |
| tree | 7c0443ce46ac408acc49de91729d5d3dd7423a53 /llvm/lib/CodeGen/SelectionDAG | |
| parent | 4dbab8a49d99e8a4a1479738346d541d954d0386 (diff) | |
| download | bcm5719-llvm-0ce4a7cc4440f1f66d91ad61057790eb196f2e4a.tar.gz bcm5719-llvm-0ce4a7cc4440f1f66d91ad61057790eb196f2e4a.zip | |
Make sure both PendingLoads and PendingExports are flushed
before an invoke. Failure to do this causes references in
the landing pad to variables that were not set. Fixes
g++.dg/eh/delayslot1.C
g++.dg/eh/fp-regs.C
g++.old-deja/g++.brendan/eh1.C
llvm-svn: 49243
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG')
| -rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp index f237cafd493..cfef9acd4fc 100644 --- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp @@ -3171,7 +3171,10 @@ void SelectionDAGLowering::LowerCallTo(CallSite CS, SDOperand Callee, // Insert a label before the invoke call to mark the try range. This can be // used to detect deletion of the invoke via the MachineModuleInfo. BeginLabel = MMI->NextLabelID(); - DAG.setRoot(DAG.getNode(ISD::LABEL, MVT::Other, getRoot(), + // Both PendingLoads and PendingExports must be flushed here; + // this call might not return. + (void)getRoot(); + DAG.setRoot(DAG.getNode(ISD::LABEL, MVT::Other, getControlRoot(), DAG.getConstant(BeginLabel, MVT::i32), DAG.getConstant(1, MVT::i32))); } |

