diff options
author | Bill Wendling <isanbard@gmail.com> | 2010-10-29 07:46:01 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2010-10-29 07:46:01 +0000 |
commit | 49ad731adf0f3f03a99d4944b2b367a6bfd355d0 (patch) | |
tree | 0952069e0334ab0c8a8f5bc3f66a9fa3625358de /lib/CodeGen/DwarfEHPrepare.cpp | |
parent | b087c8490f6ad46c44825ccb08481c96a45b15ad (diff) | |
download | llvm-49ad731adf0f3f03a99d4944b2b367a6bfd355d0.tar.gz llvm-49ad731adf0f3f03a99d4944b2b367a6bfd355d0.tar.bz2 llvm-49ad731adf0f3f03a99d4944b2b367a6bfd355d0.tar.xz |
This may be an ARM target, so check for _Unwind_SjLj_Resume.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117643 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/DwarfEHPrepare.cpp')
-rw-r--r-- | lib/CodeGen/DwarfEHPrepare.cpp | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/lib/CodeGen/DwarfEHPrepare.cpp b/lib/CodeGen/DwarfEHPrepare.cpp index f43136a289..0ebb5b0db7 100644 --- a/lib/CodeGen/DwarfEHPrepare.cpp +++ b/lib/CodeGen/DwarfEHPrepare.cpp @@ -43,7 +43,7 @@ namespace { // The eh.selector intrinsic. Function *SelectorIntrinsic; - // _Unwind_Resume_or_Rethrow call. + // _Unwind_Resume_or_Rethrow or _Unwind_SjLj_Resume call. Constant *URoR; // The EH language-specific catch-all type. @@ -82,11 +82,11 @@ namespace { /// FindAllURoRInvokes - Find all URoR invokes in the function. void FindAllURoRInvokes(SmallPtrSet<InvokeInst*, 32> &URoRInvokes); - /// HandleURoRInvokes - Handle invokes of "_Unwind_Resume_or_Rethrow" - /// calls. The "unwind" part of these invokes jump to a landing pad within - /// the current function. This is a candidate to merge the selector - /// associated with the URoR invoke with the one from the URoR's landing - /// pad. + /// HandleURoRInvokes - Handle invokes of "_Unwind_Resume_or_Rethrow" or + /// "_Unwind_SjLj_Resume" calls. The "unwind" part of these invokes jump to + /// a landing pad within the current function. This is a candidate to merge + /// the selector associated with the URoR invoke with the one from the + /// URoR's landing pad. bool HandleURoRInvokes(); /// FindSelectorAndURoR - Find the eh.selector call and URoR call associated @@ -226,10 +226,11 @@ DwarfEHPrepare::FindSelectorAndURoR(Instruction *Inst, bool &URoRInvoke, return Changed; } -/// HandleURoRInvokes - Handle invokes of "_Unwind_Resume_or_Rethrow" calls. The -/// "unwind" part of these invokes jump to a landing pad within the current -/// function. This is a candidate to merge the selector associated with the URoR -/// invoke with the one from the URoR's landing pad. +/// HandleURoRInvokes - Handle invokes of "_Unwind_Resume_or_Rethrow" or +/// "_Unwind_SjLj_Resume" calls. The "unwind" part of these invokes jump to a +/// landing pad within the current function. This is a candidate to merge the +/// selector associated with the URoR invoke with the one from the URoR's +/// landing pad. bool DwarfEHPrepare::HandleURoRInvokes() { if (!EHCatchAllValue) { EHCatchAllValue = @@ -249,7 +250,10 @@ bool DwarfEHPrepare::HandleURoRInvokes() { if (!URoR) { URoR = F->getParent()->getFunction("_Unwind_Resume_or_Rethrow"); - if (!URoR) return CleanupSelectors(CatchAllSels); + if (!URoR) { + URoR = F->getParent()->getFunction("_Unwind_SjLj_Resume"); + if (!URoR) return CleanupSelectors(CatchAllSels); + } } SmallPtrSet<InvokeInst*, 32> URoRInvokes; |