Skip to content

[libc++] Officially remove _VSTD and _LIBCPP_INLINE_VISIBILITY #79885

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 30, 2024

Conversation

ldionne
Copy link
Member

@ldionne ldionne commented Jan 29, 2024

Those were deprecated and basically not used anymore after we renamed them in batch. This patch removes the macros entirely.

Those were deprecated and basically not used anymore after we renamed
them in batch. This patch removes the macros entirely.
@ldionne ldionne requested a review from a team as a code owner January 29, 2024 19:37
@llvmbot llvmbot added the libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi. label Jan 29, 2024
@llvmbot
Copy link
Member

llvmbot commented Jan 29, 2024

@llvm/pr-subscribers-libcxx

Author: Louis Dionne (ldionne)

Changes

Those were deprecated and basically not used anymore after we renamed them in batch. This patch removes the macros entirely.


Full diff: https://github.com/llvm/llvm-project/pull/79885.diff

3 Files Affected:

  • (modified) libcxx/docs/ReleaseNotes/19.rst (+1-3)
  • (modified) libcxx/include/__config (-5)
  • (modified) libcxx/include/__format/format_functions.h (+2-2)
diff --git a/libcxx/docs/ReleaseNotes/19.rst b/libcxx/docs/ReleaseNotes/19.rst
index 17a0415a8ad4364..6ba0924297bb2aa 100644
--- a/libcxx/docs/ReleaseNotes/19.rst
+++ b/libcxx/docs/ReleaseNotes/19.rst
@@ -70,9 +70,7 @@ Deprecations and Removals
 - TODO: The ``_LIBCPP_ENABLE_CXX17_REMOVED_FEATURES`` and ``_LIBCPP_ENABLE_CXX20_REMOVED_FEATURES`` macros have
   been removed in LLVM 19. C++17 and C++20 removed features can still be re-enabled individually.
 
-- TODO: The macro ``_LIBCPP_INLINE_VISIBILITY`` has been removed in LLVM 19.
-
-- TODO: The macro ``_VSTD`` has been removed in LLVM 19.
+- The ``_LIBCPP_INLINE_VISIBILITY`` and ``_VSTD`` macros have been removed in LLVM 19.
 
 
 Upcoming Deprecations and Removals
diff --git a/libcxx/include/__config b/libcxx/include/__config
index 8d27e7744e447b2..16b965db301a6b5 100644
--- a/libcxx/include/__config
+++ b/libcxx/include/__config
@@ -874,11 +874,6 @@ typedef __char32_t char32_t;
 #    define _LIBCPP_HIDE_FROM_ABI_AFTER_V1 _LIBCPP_HIDE_FROM_ABI
 #  endif
 
-// TODO(LLVM-19): Remove _LIBCPP_INLINE_VISIBILITY and _VSTD, which we're keeping around
-//                only to ease the renaming for downstreams.
-#  define _LIBCPP_INLINE_VISIBILITY _LIBCPP_HIDE_FROM_ABI
-#  define _VSTD std
-
 // Inline namespaces are available in Clang/GCC/MSVC regardless of C++ dialect.
 // clang-format off
 #  define _LIBCPP_BEGIN_NAMESPACE_STD namespace _LIBCPP_TYPE_VISIBILITY_DEFAULT std {                                  \
diff --git a/libcxx/include/__format/format_functions.h b/libcxx/include/__format/format_functions.h
index cf833ad20554412..3ee53539f4ee6cb 100644
--- a/libcxx/include/__format/format_functions.h
+++ b/libcxx/include/__format/format_functions.h
@@ -67,14 +67,14 @@ using wformat_args = basic_format_args<wformat_context>;
 
 template <class _Context = format_context, class... _Args>
 _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI __format_arg_store<_Context, _Args...> make_format_args(_Args&... __args) {
-  return _VSTD::__format_arg_store<_Context, _Args...>(__args...);
+  return std::__format_arg_store<_Context, _Args...>(__args...);
 }
 
 #  ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
 template <class... _Args>
 _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI __format_arg_store<wformat_context, _Args...>
 make_wformat_args(_Args&... __args) {
-  return _VSTD::__format_arg_store<wformat_context, _Args...>(__args...);
+  return std::__format_arg_store<wformat_context, _Args...>(__args...);
 }
 #  endif
 

Copy link
Member

@var-const var-const left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome!

@philnik777 philnik777 merged commit 683bc94 into llvm:main Jan 30, 2024
@ldionne ldionne deleted the review/remove-vstd branch January 30, 2024 13:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants