[libc-commits] [libc] [libc] Move from alias(X) to asm(X) for aliasing (PR #89333)
Nick Desaulniers via libc-commits
libc-commits at lists.llvm.org
Fri Apr 19 10:51:39 PDT 2024
================
@@ -25,7 +25,7 @@
#define LLVM_LIBC_FUNCTION_IMPL(type, name, arglist) \
LLVM_LIBC_FUNCTION_ATTR decltype(LIBC_NAMESPACE::name) \
__##name##_impl__ __asm__(#name); \
- decltype(LIBC_NAMESPACE::name) name [[gnu::alias(#name)]]; \
----------------
nickdesaulniers wrote:
How does this macro result in two symbols in the emitted binary, one non-mangled, and one mangled wrt. the namespace? If I extract out this macro, I only see the non-mangled name.
https://godbolt.org/z/oedsKxroP
But for full build, if you run `llvm-readelf -s <build dir>/libc/lib/libc.a` you see the pairs of symbol names.
There's something else I'm missing here...
https://github.com/llvm/llvm-project/pull/89333
More information about the libc-commits
mailing list