aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHubert Tong <hubert.reinterpretcast@gmail.com>2024-05-20 10:54:49 -0400
committerGitHub <noreply@github.com>2024-05-20 10:54:49 -0400
commit2a90d59fc3905d3d56dac99fa25640a6d6a7bad2 (patch)
tree542a2c6a717a9dee660d6192f03e768809e8a5c5
parent60fe1e9e657180cc66dc5b1211b06144f010852b (diff)
downloadllvm-2a90d59fc3905d3d56dac99fa25640a6d6a7bad2.zip
llvm-2a90d59fc3905d3d56dac99fa25640a6d6a7bad2.tar.gz
llvm-2a90d59fc3905d3d56dac99fa25640a6d6a7bad2.tar.bz2
[libcxx] locale.cpp: Move build_name helper into unnamed namespace (#92461)
Fix linkage of `build_name`; it is not supposed to have external linkage.
-rw-r--r--libcxx/src/locale.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/libcxx/src/locale.cpp b/libcxx/src/locale.cpp
index 1ca88e3..c5ab6de 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;