[libcxx-commits] [libcxx] [libcxx] Support providing symbol suffix through compiler define (PR #122570)
via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Jan 10 20:42:16 PST 2025
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 833a17489dd96f35df3a17ad231ada82acf38ef9 63f365ba5b4795a6225e9a70ccc2a026578afbe6 --extensions h -- libcxx/src/include/overridable_function.h
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/libcxx/src/include/overridable_function.h b/libcxx/src/include/overridable_function.h
index 7eee4ecd06..d1cfcb763b 100644
--- a/libcxx/src/include/overridable_function.h
+++ b/libcxx/src/include/overridable_function.h
@@ -62,7 +62,7 @@
// the unique suffix needs to be supplied by the build system. The `_LIBCPP_SYMBOL_SUFFIX` can
// be used for that purpose.
#ifndef _LIBCPP_SYMBOL_SUFFIX
-#define _LIBCPP_SYMBOL_SUFFIX
+# define _LIBCPP_SYMBOL_SUFFIX
#endif
#if defined(_LIBCPP_OBJECT_FORMAT_MACHO)
@@ -100,7 +100,7 @@ _LIBCPP_END_NAMESPACE_STD
# define _LIBCPP_CAN_DETECT_OVERRIDDEN_FUNCTION 1
# define _LIBCPP_OVERRIDABLE_FUNCTION(symbol, type, name, arglist) \
static type symbol##_impl__ arglist __asm__(_LIBCPP_TOSTRING(symbol##_impl__)); \
- [[gnu::weak, gnu::alias(_LIBCPP_TOSTRING(symbol##_impl__) _LIBCPP_SYMBOL_SUFFIX)]] type name arglist; \
+ [[ gnu::weak, gnu::alias(_LIBCPP_TOSTRING(symbol##_impl__) _LIBCPP_SYMBOL_SUFFIX) ]] type name arglist; \
_LIBCPP_BEGIN_NAMESPACE_STD \
template <> \
inline bool __is_function_overridden<static_cast<type(*) arglist>(name)>() { \
``````````
</details>
https://github.com/llvm/llvm-project/pull/122570
More information about the libcxx-commits
mailing list