[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 15:49:43 PDT 2024


nickdesaulniers wrote:

Looks like the headers under `libc/src/{hname}/{fname}.h` would also need to declare the namespaced function in order for the tests to call them.
```diff
diff --git a/libc/src/ctype/isalnum.h b/libc/src/ctype/isalnum.h
index 71830c95cb2f..bd7926fd32f7 100644
--- a/libc/src/ctype/isalnum.h
+++ b/libc/src/ctype/isalnum.h
@@ -9,10 +9,7 @@
 #ifndef LLVM_LIBC_SRC_CTYPE_ISALNUM_H
 #define LLVM_LIBC_SRC_CTYPE_ISALNUM_H
 
-namespace LIBC_NAMESPACE {
-
-int isalnum(int c);
-
-} // namespace LIBC_NAMESPACE
+extern "C" int isalnum(int c);
+namespace LIBC_NAMESPACE { int isalnum(int c); }
 
 #endif //  LLVM_LIBC_SRC_CTYPE_ISALNUM_H
```
could probably hide those with another macro though. 😋 

https://github.com/llvm/llvm-project/pull/89333


More information about the libc-commits mailing list