[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
Thu Sep 28 22:21:52 PDT 2017


compnerd added a comment.

Ugh, I was mixing up `_Unwind_SjLj_Register` with this function.



================
Comment at: src/Unwind-sjlj.c:468
 
+#ifndef __APPLE__
+__thread struct _Unwind_FunctionContext *stack = NULL;
----------------
I would prefer:

    #if !defined(__APPLE__)


================
Comment at: src/Unwind-sjlj.c:469
+#ifndef __APPLE__
+__thread struct _Unwind_FunctionContext *stack = NULL;
+
----------------
Please make this `static`.


================
Comment at: src/Unwind-sjlj.c:481
+#endif // !defined(__APPLE__)
+
 #endif // defined(_LIBUNWIND_BUILD_SJLJ_APIS)
----------------
Can't both of these also be static?


https://reviews.llvm.org/D38250





More information about the cfe-commits mailing list