[PATCH] D49240: [libc++] Introduce _LIBCPP_HIDE_FROM_ABI to replace _LIBCPP_INLINE_VISIBILITY

Reid Kleckner via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Aug 10 15:19:23 PDT 2018


rnk added a comment.

In https://reviews.llvm.org/D49240#1195733, @ldionne wrote:

> Ah, thanks a lot for taking a look! Yes, this makes a lot of sense, since now we're not inlining everything anymore. So the code size is actually smaller (-9.8%), but there's more symbols because more functions are emitted. In this case, I would say this is expected, if unfortunate. Also, a similar effect would probably be witnessed if Chromium were to change their standard library to libstdc++, for example, since libstdc++ does not abuse inlining like libc++ used to.


I think if we used libstdc++, the situation would be much better because the inline functions would be linkonce_odr, and there would be far fewer symbols in the symbol table. We'd get code size wins from deduplicating the code, and symbol table size wins from dropping duplicate long mangled names.


Repository:
  rCXX libc++

https://reviews.llvm.org/D49240





More information about the cfe-commits mailing list