[libcxx-commits] [libcxx] [libc++] Make __thread_hardware_concurrency() an alias to an existing symbol (PR #234575)
via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Oct 22 03:53:19 PDT 2026
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff origin/main HEAD --extensions cpp,h -- libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.static/tmp.hardware_concurrency_func.pass.cpp libcxx/include/__configuration/availability.h libcxx/include/__thread/hardware_concurrency.h libcxx/include/__thread/thread.h libcxx/src/thread.cpp --diff_from_common_commit
``````````
:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/libcxx/include/__thread/hardware_concurrency.h b/libcxx/include/__thread/hardware_concurrency.h
index 043e3883b..c378cba66 100644
--- a/libcxx/include/__thread/hardware_concurrency.h
+++ b/libcxx/include/__thread/hardware_concurrency.h
@@ -38,14 +38,15 @@ _LIBCPP_BEGIN_EXPLICIT_ABI_ANNOTATIONS
# define _LIBCPP_THREAD_ABI_NAMESPACE_LENGTH___1 3
# define _LIBCPP_THREAD_ABI_NAMESPACE_LENGTH___2 3
# define _LIBCPP_THREAD_ABI_NAMESPACE_LENGTH___ndk1 6
-# define _LIBCPP_THREAD_ABI_NAMESPACE_LENGTH _LIBCPP_CONCAT(_LIBCPP_THREAD_ABI_NAMESPACE_LENGTH_, _LIBCPP_ABI_NAMESPACE)
+# define _LIBCPP_THREAD_ABI_NAMESPACE_LENGTH \
+ _LIBCPP_CONCAT(_LIBCPP_THREAD_ABI_NAMESPACE_LENGTH_, _LIBCPP_ABI_NAMESPACE)
# if _LIBCPP_THREAD_ABI_NAMESPACE_LENGTH == 0
# error "Unknown length of _LIBCPP_ABI_NAMESPACE, add it to <__thread/hardware_concurrency.h>"
# endif
# define _LIBCPP_THREAD_HARDWARE_CONCURRENCY_SYMBOL \
_LIBCPP_TOSTRING(__USER_LABEL_PREFIX__) \
"_ZNSt" _LIBCPP_TOSTRING(_LIBCPP_THREAD_ABI_NAMESPACE_LENGTH) _LIBCPP_THREAD_ABI_NAMESPACE_STR \
- "6thread20hardware_concurrencyEv"
+ "6thread20hardware_concurrencyEv"
# endif
[[__nodiscard__]] _LIBCPP_EXPORTED_FROM_ABI unsigned __thread_hardware_concurrency() _NOEXCEPT
``````````
</details>
https://github.com/llvm/llvm-project/pull/234575
More information about the libcxx-commits
mailing list