[clang] [Serialization] Load Specializations Lazily (1/2) (PR #76774)

Chuanqi Xu via cfe-commits cfe-commits at lists.llvm.org
Sun Jan 7 22:53:05 PST 2024


================
@@ -1249,3 +1249,5 @@ void ODRHash::AddQualType(QualType T) {
 void ODRHash::AddBoolean(bool Value) {
   Bools.push_back(Value);
 }
+
+void ODRHash::AddInteger(unsigned Value) { ID.AddInteger(Value); }
----------------
ChuanqiXu9 wrote:

I tried to add a test case to show the problem in https://github.com/llvm/llvm-project/commit/9b808a4beb8e6c8255b412fdd6f5a3e20cbcf270. But the current patch works well for that. While I agree the ODRHash may be too aggressive for the problem we're solving, I don't want to write things that can't be well tested. I am wondering if we can proceed by leaving a FIXME here if we can't find good test in time? Or maybe we can add an option `-fload-specialization-lazily`, then we can regress smoothly if there are any problems.

@hahnjo @vgvassilev 

https://github.com/llvm/llvm-project/pull/76774


More information about the cfe-commits mailing list