[libcxx-commits] [libcxxabi] 9d2740f - [libc++abi] Apply simplify scan_eh_tab to SjLj

Louis Dionne via libcxx-commits libcxx-commits at lists.llvm.org
Tue Aug 24 13:52:03 PDT 2021


Author: Kazushi (Jam) Marukawa
Date: 2021-08-24T16:51:53-04:00
New Revision: 9d2740f331772d372d4d437192da56b8c60e9fe8

URL: https://github.com/llvm/llvm-project/commit/9d2740f331772d372d4d437192da56b8c60e9fe8
DIFF: https://github.com/llvm/llvm-project/commit/9d2740f331772d372d4d437192da56b8c60e9fe8.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

Added: 
    

Modified: 
    libcxxabi/src/cxa_personality.cpp

Removed: 
    


################################################################################
diff  --git a/libcxxabi/src/cxa_personality.cpp b/libcxxabi/src/cxa_personality.cpp
index d63741b19b3dc..e31619ab6dc14 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 libcxx-commits mailing list