[libcxx-commits] [PATCH] D142415: libcxx: Don't apply ABI tags to extern "C" fns
Louis Dionne via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Jan 23 17:27:05 PST 2023
ldionne accepted this revision.
ldionne added a comment.
This revision is now accepted and ready to land.
LGTM w/ green CI and suggestions applied.
================
Comment at: libcxx/include/__config:626-628
+// This macro provides a HIDE_FROM_ABI equivalent that can be applied to extern
+// "C" function, as those lack mangling.
+# define _LIBCPP_HIDE_FROM_ABI_C _LIBCPP_HIDDEN _LIBCPP_EXCLUDE_FROM_EXPLICIT_INSTANTIATION
----------------
Can you define this below with `_LIBCPP_HIDE_FROM_ABI_VIRTUAL`?
================
Comment at: libcxx/include/__config:631
# define _LIBCPP_HIDE_FROM_ABI \
- _LIBCPP_HIDDEN _LIBCPP_EXCLUDE_FROM_EXPLICIT_INSTANTIATION \
- __attribute__((__abi_tag__(_LIBCPP_TOSTRING(_LIBCPP_VERSIONED_IDENTIFIER))))
+ _LIBCPP_HIDE_FROM_ABI_C \
+ __attribute__((__abi_tag__(_LIBCPP_TOSTRING(_LIBCPP_VERSIONED_IDENTIFIER))))
----------------
Please don't modify this macro -- I know it's possible to "reuse" `_LIBCPP_HIDE_FROM_ABI_C` to define `_LIBCPP_HIDE_FROM_ABI`, but IMO adding a layer of indirection there makes things harder to understand. And since that is already extremely tricky, I don't think we should :-).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D142415/new/
https://reviews.llvm.org/D142415
More information about the libcxx-commits
mailing list