[clang] [clang] Increase VecLib bitfield size to 4 bits in CodeGenOptions.def (PR #108804)
Erich Keane via cfe-commits
cfe-commits at lists.llvm.org
Tue Sep 17 06:49:58 PDT 2024
================
@@ -375,8 +375,13 @@ ENUM_CODEGENOPT(Inlining, InliningMethod, 2, NormalInlining)
/// The maximum stack size a function can have to be considered for inlining.
VALUE_CODEGENOPT(InlineMaxStackSize, 32, UINT_MAX)
+// Ensure the VecLib bitfield has enough space for future vector libraries.
+// If new vector libraries are added beyond the current limit of 16, this static assertion will fail.
+static_assert(static_cast<int>(llvm::driver::VectorLibrary::NoLibrary) <= 16,
----------------
erichkeane wrote:
Also, should static assert to size_t instead of int, but that is just a nit.
https://github.com/llvm/llvm-project/pull/108804
More information about the cfe-commits
mailing list