[llvm-branch-commits] [libcxxabi] 4094728 - [libc++abi] Apply simplify scan_eh_tab to SjLj

Louis Dionne via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Thu Aug 26 10:22:40 PDT 2021


Author: Kazushi (Jam) Marukawa
Date: 2021-08-26T13:22:32-04:00
New Revision: 4094728a81478ae05e4e6cefdc7b2a2cb3a5e73b

URL: https://github.com/llvm/llvm-project/commit/4094728a81478ae05e4e6cefdc7b2a2cb3a5e73b
DIFF: https://github.com/llvm/llvm-project/commit/4094728a81478ae05e4e6cefdc7b2a2cb3a5e73b.diff

LOG: [libc++abi] Apply simplify scan_eh_tab to SjLj

Previous "simplify scan_eh_tab" patch, https://reviews.llvm.org/D93190,
saves landingpad if and only if the target is not using SjLj exceptions.
However, the landingpad is used by SjLj exception handler also.  This
patch changes to set landingpad for both exception handlers.

Differential Revision: https://reviews.llvm.org/D108082

(cherry picked from commit 9d2740f331772d372d4d437192da56b8c60e9fe8)

Added: 
    

Modified: 
    libcxxabi/src/cxa_personality.cpp

Removed: 
    


################################################################################
diff  --git a/libcxxabi/src/cxa_personality.cpp b/libcxxabi/src/cxa_personality.cpp
index a4f81d74735f1..91b584eb8c8d4 100644
--- a/libcxxabi/src/cxa_personality.cpp
+++ b/libcxxabi/src/cxa_personality.cpp
@@ -702,10 +702,10 @@ static void scan_eh_tab(scan_results &results, _Unwind_Action actions,
                 return;
             }
             landingPad = (uintptr_t)lpStart + landingPad;
-            results.landingPad = landingPad;
 #else  // __USING_SJLJ_EXCEPTIONS__
             ++landingPad;
 #endif // __USING_SJLJ_EXCEPTIONS__
+            results.landingPad = landingPad;
             if (actionEntry == 0)
             {
                 // Found a cleanup


        


More information about the llvm-branch-commits mailing list