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

via libc-commits libc-commits at lists.llvm.org
Tue Nov 19 14:08:43 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))
----------------
lntue wrote:

Updated line 26.  Passing the macro from `EXPAND_THEN_SECOND` to `SECOND`  will ignore the spaces there, give some extra spaces should make it better for readability.

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


More information about the libc-commits mailing list