[libc-commits] [libc] [libc] Allow each function can have extra attributes by defining LLVM_LIBC_FUNCTION_ATTR_func macro. (PR #116160)

Nick Desaulniers via libc-commits libc-commits at lists.llvm.org
Tue Nov 19 10:56:12 PST 2024


================
@@ -21,9 +21,24 @@
 #define LLVM_LIBC_FUNCTION_ATTR
 #endif
 
+// Allow each function `func` can have extra attributes specified by defining:
+// `LLVM_LIBC_FUNCTION_ATTR_func` macro, which should always start with
+// "LLVM_LIBC_EMPTY,"
+//
+// For example:
+// #define LLVM_LIBC_FUNCTION_ATTR_memcpy LLVM_LIBC_EMPTY, __attribute__((weak))
----------------
nickdesaulniers wrote:

Perhaps worth documenting any new command line options in docs/dev/implementation_standard.rst.

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


More information about the libc-commits mailing list