[libc-commits] [libc] 9088f38 - [libc] Fix LIBC_INLINE build error in riscv/irelative.cpp (#183249)

via libc-commits libc-commits at lists.llvm.org
Wed Feb 25 01:09:42 PST 2026


Author: Jeff Bailey
Date: 2026-02-25T09:09:38Z
New Revision: 9088f38021d6f7f4c6852e63ea6988b87be81cc8

URL: https://github.com/llvm/llvm-project/commit/9088f38021d6f7f4c6852e63ea6988b87be81cc8
DIFF: https://github.com/llvm/llvm-project/commit/9088f38021d6f7f4c6852e63ea6988b87be81cc8.diff

LOG: [libc] Fix LIBC_INLINE build error in riscv/irelative.cpp (#183249)

LIBC_INLINE is defined in attributes.h, which was not included. Since
constexpr already implies inline, simply remove the LIBC_INLINE
qualifier from the static helper, matching the x86_64 and aarch64
irelative implementations.

Added: 
    

Modified: 
    libc/startup/linux/riscv/irelative.cpp

Removed: 
    


################################################################################
diff  --git a/libc/startup/linux/riscv/irelative.cpp b/libc/startup/linux/riscv/irelative.cpp
index f27ce8dd3bfaf..71a51828a26eb 100644
--- a/libc/startup/linux/riscv/irelative.cpp
+++ b/libc/startup/linux/riscv/irelative.cpp
@@ -16,7 +16,7 @@ namespace LIBC_NAMESPACE_DECL {
 
 // RISC-V may be 32-bit or 64-bit. ElfW(Rela) handles the struct type,
 // but we need the correct R_TYPE extraction macro.
-static LIBC_INLINE constexpr unsigned get_r_type(uintptr_t info) {
+static constexpr unsigned get_r_type(uintptr_t info) {
 #ifdef __LP64__
   return ELF64_R_TYPE(info);
 #else


        


More information about the libc-commits mailing list