[libunwind] r357711 - Move the alias definition of unw_getcontext to within !defined(__USING_SJLJ_EXCEPTIONS__)

Martin Storsjo via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 4 10:50:14 PDT 2019


Author: mstorsjo
Date: Thu Apr  4 10:50:14 2019
New Revision: 357711

URL: http://llvm.org/viewvc/llvm-project?rev=357711&view=rev
Log:
Move the alias definition of unw_getcontext to within !defined(__USING_SJLJ_EXCEPTIONS__)

For builds with SJLJ, there is no __unw_getcontext symbol. On Windows,
the weak alias macro also expands to a dllexport directive, which fails
if the symbol doesn't exist.

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

Modified:
    libunwind/trunk/src/UnwindRegistersSave.S

Modified: libunwind/trunk/src/UnwindRegistersSave.S
URL: http://llvm.org/viewvc/llvm-project/libunwind/trunk/src/UnwindRegistersSave.S?rev=357711&r1=357710&r2=357711&view=diff
==============================================================================
--- libunwind/trunk/src/UnwindRegistersSave.S (original)
+++ libunwind/trunk/src/UnwindRegistersSave.S Thu Apr  4 10:50:14 2019
@@ -972,8 +972,9 @@ DEFINE_LIBUNWIND_FUNCTION(__unw_getconte
   jmp %o7
    clr %o0                   // return UNW_ESUCCESS
 #endif
-#endif /* !defined(__USING_SJLJ_EXCEPTIONS__) */
 
   WEAK_ALIAS(__unw_getcontext, unw_getcontext)
 
+#endif /* !defined(__USING_SJLJ_EXCEPTIONS__) */
+
 NO_EXEC_STACK_DIRECTIVE




More information about the cfe-commits mailing list