rogfer01 created this revision.
rogfer01 added reviewers: eopXD, Eugene.Zelenko, craig.topper.
Herald added subscribers: jobnoorman, VincentWu, vkmr, luismarques, 
sameer.abuasal, s.egerton, Jim, benna, psnobl, PkmX, shiva0217, kito-cheng, 
simoncook, arichardson.
Herald added a project: All.
rogfer01 requested review of this revision.
Herald added subscribers: cfe-commits, wangpc.
Herald added a project: clang.

In https://reviews.llvm.org/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).

  $ touch t.c
  $ clang -cc1 -triple riscv64 -w -emit-pch -o test.pch t.c
  $ clang -cc1 -triple riscv64 -w -x c -include-pch test.pch -ast-dump-all 
/dev/null

The total number required now by clang seems to go far beyond 300 so increasing 
the value to 500 seems to solve the problem. This value was already increased 
in D92715 <https://reviews.llvm.org/D92715> but I assume this has some impact 
on the on-disk format.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D153111

Files:
  clang/include/clang/Serialization/ASTBitCodes.h


Index: clang/include/clang/Serialization/ASTBitCodes.h
===================================================================
--- clang/include/clang/Serialization/ASTBitCodes.h
+++ clang/include/clang/Serialization/ASTBitCodes.h
@@ -1106,7 +1106,7 @@
 ///
 /// Type IDs for non-predefined types will start at
 /// NUM_PREDEF_TYPE_IDs.
-const unsigned NUM_PREDEF_TYPE_IDS = 300;
+const unsigned NUM_PREDEF_TYPE_IDS = 500;
 
 /// Record codes for each kind of type.
 ///


Index: clang/include/clang/Serialization/ASTBitCodes.h
===================================================================
--- clang/include/clang/Serialization/ASTBitCodes.h
+++ clang/include/clang/Serialization/ASTBitCodes.h
@@ -1106,7 +1106,7 @@
 ///
 /// Type IDs for non-predefined types will start at
 /// NUM_PREDEF_TYPE_IDs.
-const unsigned NUM_PREDEF_TYPE_IDS = 300;
+const unsigned NUM_PREDEF_TYPE_IDS = 500;
 
 /// Record codes for each kind of type.
 ///
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to