[libcxx-commits] [libcxx] 2a90d59 - [libcxx] locale.cpp: Move build_name helper into unnamed namespace (#92461)
via libcxx-commits
libcxx-commits at lists.llvm.org
Mon May 20 07:54:53 PDT 2024
Author: Hubert Tong
Date: 2024-05-20T10:54:49-04:00
New Revision: 2a90d59fc3905d3d56dac99fa25640a6d6a7bad2
URL: https://github.com/llvm/llvm-project/commit/2a90d59fc3905d3d56dac99fa25640a6d6a7bad2
DIFF: https://github.com/llvm/llvm-project/commit/2a90d59fc3905d3d56dac99fa25640a6d6a7bad2.diff
LOG: [libcxx] locale.cpp: Move build_name helper into unnamed namespace (#92461)
Fix linkage of `build_name`; it is not supposed to have external
linkage.
Added:
Modified:
libcxx/src/locale.cpp
Removed:
################################################################################
diff --git a/libcxx/src/locale.cpp b/libcxx/src/locale.cpp
index 1ca88e30f63ac..c5ab6de5d657a 100644
--- a/libcxx/src/locale.cpp
+++ b/libcxx/src/locale.cpp
@@ -102,8 +102,6 @@ inline constexpr size_t countof(const T* const begin, const T* const end) {
return static_cast<size_t>(end - begin);
}
-} // namespace
-
string build_name(const string& other, const string& one, locale::category c) {
if (other == "*" || one == "*")
return "*";
@@ -115,6 +113,8 @@ string build_name(const string& other, const string& one, locale::category c) {
return "*";
}
+} // namespace
+
const locale::category locale::none;
const locale::category locale::collate;
const locale::category locale::ctype;
More information about the libcxx-commits
mailing list