[libcxx-commits] [PATCH] D60251: [libunwind] Move the alias definition of unw_getcontext to within !defined(__USING_SJLJ_EXCEPTIONS__)

Martin Storsjö via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Wed Apr 3 23:16:12 PDT 2019


mstorsjo created this revision.
mstorsjo added reviewers: phosek, ldionne, mclow.lists, EricWF.
Herald added a subscriber: dexonsmith.

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.

Apparently I had forgotten to test actual builds with SJLJ, sorry for that omission.


Repository:
  rUNW libunwind

https://reviews.llvm.org/D60251

Files:
  src/UnwindRegistersSave.S


Index: src/UnwindRegistersSave.S
===================================================================
--- src/UnwindRegistersSave.S
+++ src/UnwindRegistersSave.S
@@ -972,8 +972,9 @@
   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


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D60251.193661.patch
Type: text/x-patch
Size: 432 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20190404/59c4529c/attachment.bin>


More information about the libcxx-commits mailing list