diff options
| author | Roman Divacky <rdivacky@FreeBSD.org> | 2010-03-10 17:45:15 +0000 | 
|---|---|---|
| committer | Roman Divacky <rdivacky@FreeBSD.org> | 2010-03-10 17:45:15 +0000 | 
| commit | ea5b2dd11c0526581803e7eb58224a2eabf191e6 (patch) | |
| tree | 231646bba785a129b3a2d409badb74e7ccd1594c /lib/CodeGen/MachineModuleInfo.cpp | |
| parent | f5a3459adfde823bc7617f8ecfdd9fbc5a1ffadf (diff) | |
Notes
Diffstat (limited to 'lib/CodeGen/MachineModuleInfo.cpp')
| -rw-r--r-- | lib/CodeGen/MachineModuleInfo.cpp | 12 | 
1 files changed, 5 insertions, 7 deletions
diff --git a/lib/CodeGen/MachineModuleInfo.cpp b/lib/CodeGen/MachineModuleInfo.cpp index 5052af7bd8f0..72fb9fd987d9 100644 --- a/lib/CodeGen/MachineModuleInfo.cpp +++ b/lib/CodeGen/MachineModuleInfo.cpp @@ -185,7 +185,8 @@ void MachineModuleInfo::addCleanup(MachineBasicBlock *LandingPad) {  void MachineModuleInfo::TidyLandingPads() {    for (unsigned i = 0; i != LandingPads.size(); ) {      LandingPadInfo &LandingPad = LandingPads[i]; -    LandingPad.LandingPadLabel = MappedLabel(LandingPad.LandingPadLabel); +    if (isLabelDeleted(LandingPad.LandingPadLabel)) +      LandingPad.LandingPadLabel = 0;      // Special case: we *should* emit LPs with null LP MBB. This indicates      // "nounwind" case. @@ -195,17 +196,14 @@ void MachineModuleInfo::TidyLandingPads() {      }      for (unsigned j=0; j != LandingPads[i].BeginLabels.size(); ) { -      unsigned BeginLabel = MappedLabel(LandingPad.BeginLabels[j]); -      unsigned EndLabel = MappedLabel(LandingPad.EndLabels[j]); - -      if (!BeginLabel || !EndLabel) { +      unsigned BeginLabel = LandingPad.BeginLabels[j]; +      unsigned EndLabel = LandingPad.EndLabels[j]; +      if (isLabelDeleted(BeginLabel) || isLabelDeleted(EndLabel)) {          LandingPad.BeginLabels.erase(LandingPad.BeginLabels.begin() + j);          LandingPad.EndLabels.erase(LandingPad.EndLabels.begin() + j);          continue;        } -      LandingPad.BeginLabels[j] = BeginLabel; -      LandingPad.EndLabels[j] = EndLabel;        ++j;      }  | 
