[compiler-rt] 332a934 - [ORC-RT][MachO] Use 'UseCallbackStyleUnwindInfo' flag, rather than re-test.

Lang Hames via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 21 16:48:20 PST 2023


Author: Lang Hames
Date: 2023-02-21T16:48:14-08:00
New Revision: 332a934ced7f1ef7212fac90de806435a2c47f89

URL: https://github.com/llvm/llvm-project/commit/332a934ced7f1ef7212fac90de806435a2c47f89
DIFF: https://github.com/llvm/llvm-project/commit/332a934ced7f1ef7212fac90de806435a2c47f89.diff

LOG: [ORC-RT][MachO] Use 'UseCallbackStyleUnwindInfo' flag, rather than re-test.

The UseCallbackStyleUnwindInfo flag already captures the original conditional,
and using the flag everywhere makes it easier to switch registration styles
when debugging.

Added: 
    

Modified: 
    compiler-rt/lib/orc/macho_platform.cpp

Removed: 
    


################################################################################
diff  --git a/compiler-rt/lib/orc/macho_platform.cpp b/compiler-rt/lib/orc/macho_platform.cpp
index 9b5b954921c1f..fcbb7264b61d9 100644
--- a/compiler-rt/lib/orc/macho_platform.cpp
+++ b/compiler-rt/lib/orc/macho_platform.cpp
@@ -437,8 +437,7 @@ Error MachOPlatformRuntimeState::initialize() {
 }
 
 Error MachOPlatformRuntimeState::shutdown() {
-  if (__unw_add_find_dynamic_unwind_sections &&
-      __unw_remove_find_dynamic_unwind_sections) {
+  if (UseCallbackStyleUnwindInfo) {
     if (__unw_remove_find_dynamic_unwind_sections(&findDynamicUnwindSections)) {
       ORC_RT_DEBUG(
           { printdbg("__unw_remove_find_dynamic_unwind_sections failed.\n"); });


        


More information about the llvm-commits mailing list