[libc] Define LLVM_LIBC_FUNCTION with a layer of macro expansion
authorRoland McGrath <mcgrathr@google.com>
Sat, 25 Mar 2023 03:29:08 +0000 (20:29 -0700)
committerRoland McGrath <mcgrathr@google.com>
Sat, 25 Mar 2023 18:30:48 +0000 (11:30 -0700)
commitd30de9844e1a9f1e77677b8cf4a7f4db977c0c9f
tree066d180528dbeb03b4dba5979e54d396538c1dc3
parent2eab58527e7b81166f1da7c21b08a06829fa1350
[libc] Define LLVM_LIBC_FUNCTION with a layer of macro expansion

Move the real LLVM_LIBC_FUNCTION macro definitions to
LLVM_LIBC_FUNCTION_IMPL and make LLVM_LIBC_FUNCTION a wrapper to
expand macros in its arguments.  This makes it possible to
compile libc implementation and test files with -Dfunc=othername.

Reviewed By: sivachandra

Differential Revision: https://reviews.llvm.org/D146863
libc/src/__support/common.h