Skip to content

Commit aaf5493

Browse files
authored
TableGen: Account for Unsupporte LibcallImpl in bitset size (#163083)
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.
1 parent ed0ca84 commit aaf5493

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/utils/TableGen/Basic/RuntimeLibcallsEmitter.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -592,7 +592,7 @@ void RuntimeLibcallEmitter::emitSystemRuntimeLibrarySetCalls(
592592
DenseMap<PredicateWithCC, LibcallsWithCC> Pred2Funcs;
593593

594594
SmallVector<uint64_t, 32> BitsetValues(
595-
divideCeil(RuntimeLibcallImplDefList.size(), BitsPerStorageElt));
595+
divideCeil(RuntimeLibcallImplDefList.size() + 1, BitsPerStorageElt));
596596

597597
for (const Record *Elt : *Elements) {
598598
const RuntimeLibcallImpl *LibCallImpl = getRuntimeLibcallImpl(Elt);

0 commit comments

Comments
 (0)