[libcxx-commits] [libcxx] [libc++] Add std::stacktrace (P0881R7) (PR #136528)

Steve O'Brien via libcxx-commits libcxx-commits at lists.llvm.org
Sun Oct 26 09:10:29 PDT 2025


================
@@ -965,6 +965,33 @@ typedef __char32_t char32_t;
 #    define _LIBCPP_NOINLINE
 #  endif
 
+// Some functions, e.g. std::stacktrace::current, need to avoid being
+// tail-called by (and tail-calling other) functions, for proper enumeration of
+// call-stack frames.
+// clang-format off
+
+// Disables tail-call optimization for "outbound" calls
----------------
elsteveogrande wrote:

(from [here](https://github.com/llvm/llvm-project/pull/136528#discussion_r2313170394)) @philnik777 I'll ensure headers are using `always_inline` and `nodebug` instead of these.  In `.cpp` files I _think_ I still need these, to disable inlining between calls in .cpp files, and possibly LTO.

https://github.com/llvm/llvm-project/pull/136528


More information about the libcxx-commits mailing list