[cfe-dev] libc++ and large stack frames

Erik van der Poel via cfe-dev cfe-dev at lists.llvm.org
Thu May 31 13:07:06 PDT 2018

This is a proposal to add a configuration option to disable
_LIBCPP_INLINE_VISIBILITY, which causes large stack frames in non-optimized
builds because it uses the always_inline attribute to force significant
amounts of inlining of libc++ code.

The new configuration option could be called

identical definitions. One could be renamed to the other or both could be
renamed to _LIBCPP_HIDE_FROM_ABI as part of this work.

Alternatives considered and rejected:

1. Remove __attribute__((__always_inline__)) from all include/__config
2. Add _LIBCPP_DISABLE_ALWAYS_INLINE to control whether or not
__always_inline__ is included in any __config macro.
3. Use the existing _LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS to control both
__visibility__ and __always_inline__.
4. Use the existing _LIBCPP_ABI_UNSTABLE to control

Further background reading:

The two macros were made identical in the following commit, an effort to
reduce the number of exported symbols (Dec 17, 2010):


Brief documentation about these macros was added later (Sep 15, 2016):


The macros were discussed here before:

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20180531/8c1c436d/attachment.html>

More information about the cfe-dev mailing list