From 3dc972aadbe44938137adb767452c35e2fc24206 Mon Sep 17 00:00:00 2001 From: Matt Arsenault Date: Mon, 13 Oct 2025 02:52:52 +0900 Subject: [PATCH] TableGen: Account for Unsupporte LibcallImpl in bitset size The Unsupported case is special and doesn't have an entry in the vector, and is directly emitted as the 0 case. This should be harmless as it is, but could break if the right number of new libcalls is added. --- llvm/utils/TableGen/Basic/RuntimeLibcallsEmitter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llvm/utils/TableGen/Basic/RuntimeLibcallsEmitter.cpp b/llvm/utils/TableGen/Basic/RuntimeLibcallsEmitter.cpp index fd8ddb1056ac3..3938d3910f62a 100644 --- a/llvm/utils/TableGen/Basic/RuntimeLibcallsEmitter.cpp +++ b/llvm/utils/TableGen/Basic/RuntimeLibcallsEmitter.cpp @@ -592,7 +592,7 @@ void RuntimeLibcallEmitter::emitSystemRuntimeLibrarySetCalls( DenseMap Pred2Funcs; SmallVector BitsetValues( - divideCeil(RuntimeLibcallImplDefList.size(), BitsPerStorageElt)); + divideCeil(RuntimeLibcallImplDefList.size() + 1, BitsPerStorageElt)); for (const Record *Elt : *Elements) { const RuntimeLibcallImpl *LibCallImpl = getRuntimeLibcallImpl(Elt);