[PATCH] D38250: [libunwind] Implement the Get/SetTopOfFunctionStack functions via a __thread TLS variable

Saleem Abdulrasool via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Oct 1 12:25:19 PDT 2017


compnerd accepted this revision.
compnerd added inline comments.
This revision is now accepted and ready to land.


================
Comment at: src/Unwind-sjlj.c:481
+#endif // !defined(__APPLE__)
+
 #endif // defined(_LIBUNWIND_BUILD_SJLJ_APIS)
----------------
mstorsjo wrote:
> compnerd wrote:
> > Can't both of these also be static?
> No, since they're declared earlier as non-static.
Yeah, that is a bug :-).  `__Unwind_SjLj_GetTopOfFunctionStack` and `__Unwind_SjLj_SetToOfFunctionStack` are implementation details of LLVM's libunwind.  They are not part of the public interfaces, and are not used outside of this TU, and should be marked as static as such.  I think that changing the prototype declaration to indicate this is reasonable.  I suppose that I can make that change separately.


https://reviews.llvm.org/D38250





More information about the cfe-commits mailing list