[clang][Serialization][RISCV] Increase the number of reserved predefined type IDs
authorRoger Ferrer Ibanez <roger.ferrer@bsc.es>
Mon, 19 Jun 2023 14:37:46 +0000 (14:37 +0000)
committerRoger Ferrer Ibanez <roger.ferrer@bsc.es>
Mon, 19 Jun 2023 14:37:46 +0000 (14:37 +0000)
commitfa45f81ff7ea9fc2a2a40fea8dd7626ecc3a8dbb
tree6f3dede6b3edc7aaee7dafde3fbb8d940ffa3f17
parent798b6419bc8446ba4d30c61e182ec628ea44ce40
[clang][Serialization][RISCV] Increase the number of reserved predefined type IDs

In D152070 we added many new intrinsic types required for the RISC-V
Vector Extension.

This was crashing when loading the AST as those types are intrinsically
added to the AST (they don't come from the disk).

The total number required now by clang exceeds 400 so increasing the
value to 500 solves the problem. This value was already increased in
D92715 but I assume this has some impact on the on-disk format.

Also add a static assert to avoid this happening again in the future.

Differential Revision: https://reviews.llvm.org/D153111
clang/include/clang/Serialization/ASTBitCodes.h
clang/lib/Serialization/ASTReader.cpp
clang/test/Modules/embed-files-compressed.cpp
clang/test/Modules/empty.modulemap