[all-commits] [llvm/llvm-project] 61c905: [libc] Add LIBC_INLINE_VAR for inline variables
Alex Brachet via All-commits
all-commits at lists.llvm.org
Fri Jun 16 08:46:54 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 61c9052cec10a80f9a48d2da9e443629089c9a88
https://github.com/llvm/llvm-project/commit/61c9052cec10a80f9a48d2da9e443629089c9a88
Author: Alex Brachet <abrachet at google.com>
Date: 2023-06-16 (Fri, 16 Jun 2023)
Changed paths:
M libc/docs/dev/code_style.rst
M libc/src/__support/macros/attributes.h
M libc/src/string/memory_utils/op_x86.h
Log Message:
-----------
[libc] Add LIBC_INLINE_VAR for inline variables
These are the only variables I could find that use LIBC_INLINE. Note, these are namespace scoped constexpr so local linkage is implied. inline is useful here to silence clang's unused-const-variable variable. For Fuchsia, the distinction between LIBC_INLINE and LIBC_INLINE_VAR is helpful because we define LIBC_INLINE as `[[gnu::always_inline]] inline` when building with gcc. This isn't meaningful on variables.
Alternatively, we could make these variables simply constexpr and also add `[[maybe_unused]]`
Reviewed By: sivachandra, mcgrathr
Differential Revision: https://reviews.llvm.org/D152951
More information about the All-commits
mailing list