[libcxx-commits] [PATCH] D106382: [lbc++][nfc] Use _LIBCPP_HIDE_FROM_ABI.

Mark de Wever via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue Jul 20 10:32:59 PDT 2021


Mordante created this revision.
Mordante requested review of this revision.
Herald added a project: libc++.
Herald added a subscriber: libcxx-commits.
Herald added a reviewer: libc++.

This replaces _LIBCPP_INLINE_VISIBILITY with _LIBCPP_HIDE_FROM_ABI. It's
not intended to do for other parts of libc++. This change makes it easy
to search and replace all occurrences of the patches in review.

Note I intent do land this after the CI passes since the change is
trivial.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D106382

Files:
  libcxx/include/__format/format_error.h
  libcxx/include/__format/format_parse_context.h


Index: libcxx/include/__format/format_parse_context.h
===================================================================
--- libcxx/include/__format/format_parse_context.h
+++ libcxx/include/__format/format_parse_context.h
@@ -39,7 +39,7 @@
   using const_iterator = typename basic_string_view<_CharT>::const_iterator;
   using iterator = const_iterator;
 
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCPP_HIDE_FROM_ABI
   constexpr explicit basic_format_parse_context(basic_string_view<_CharT> __fmt,
                                                 size_t __num_args = 0) noexcept
       : __begin_(__fmt.begin()),
@@ -52,17 +52,17 @@
   basic_format_parse_context&
   operator=(const basic_format_parse_context&) = delete;
 
-  _LIBCPP_INLINE_VISIBILITY constexpr const_iterator begin() const noexcept {
+  _LIBCPP_HIDE_FROM_ABI constexpr const_iterator begin() const noexcept {
     return __begin_;
   }
-  _LIBCPP_INLINE_VISIBILITY constexpr const_iterator end() const noexcept {
+  _LIBCPP_HIDE_FROM_ABI constexpr const_iterator end() const noexcept {
     return __end_;
   }
-  _LIBCPP_INLINE_VISIBILITY constexpr void advance_to(const_iterator __it) {
+  _LIBCPP_HIDE_FROM_ABI constexpr void advance_to(const_iterator __it) {
     __begin_ = __it;
   }
 
-  _LIBCPP_INLINE_VISIBILITY constexpr size_t next_arg_id() {
+  _LIBCPP_HIDE_FROM_ABI constexpr size_t next_arg_id() {
     if (__indexing_ == __manual)
       __throw_format_error("Using automatic argument numbering in manual "
                            "argument numbering mode");
@@ -71,7 +71,7 @@
       __indexing_ = __automatic;
     return __next_arg_id_++;
   }
-  _LIBCPP_INLINE_VISIBILITY constexpr void check_arg_id(size_t __id) {
+  _LIBCPP_HIDE_FROM_ABI constexpr void check_arg_id(size_t __id) {
     if (__indexing_ == __automatic)
       __throw_format_error("Using manual argument numbering in automatic "
                            "argument numbering mode");
Index: libcxx/include/__format/format_error.h
===================================================================
--- libcxx/include/__format/format_error.h
+++ libcxx/include/__format/format_error.h
@@ -30,14 +30,14 @@
 
 class _LIBCPP_EXCEPTION_ABI format_error : public runtime_error {
 public:
-  _LIBCPP_INLINE_VISIBILITY explicit format_error(const string& __s)
+  _LIBCPP_HIDE_FROM_ABI explicit format_error(const string& __s)
       : runtime_error(__s) {}
-  _LIBCPP_INLINE_VISIBILITY explicit format_error(const char* __s)
+  _LIBCPP_HIDE_FROM_ABI explicit format_error(const char* __s)
       : runtime_error(__s) {}
   virtual ~format_error() noexcept;
 };
 
-_LIBCPP_NORETURN inline _LIBCPP_INLINE_VISIBILITY void
+_LIBCPP_NORETURN inline _LIBCPP_HIDE_FROM_ABI void
 __throw_format_error(const char* __s) {
 #ifndef _LIBCPP_NO_EXCEPTIONS
   throw format_error(__s);


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D106382.360198.patch
Type: text/x-patch
Size: 2818 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20210720/8e0f3adc/attachment.bin>


More information about the libcxx-commits mailing list