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

Chuanqi Xu via cfe-commits cfe-commits at lists.llvm.org
Mon Jan 22 01:50:18 PST 2024


ChuanqiXu9 wrote:

In the newest push, I changed 2 things:
- In `ASTReader::LoadExternalSpecializations`, I am moving `Deserializing LookupResults(this);` before calculating the ODR hash for template arguments. Since I didn't realize that the ODRHash may trigger deserializing before.
- I introduced `-fno-load-external-specializations-lazily` to ease the debugging. When this option specified, all the specializations will be loaded when required, which keeps the previous behavior.

So if the new patch can pass directly, then it implies the issue is that I didn't realize the ODRHash may trigger deserializing.

And if not but it can pass with `-fno-load-external-specializations-lazily`, then it confirms the concern that the ODRHash algorithm for template arguments is not good.

Then if it can't pass with `-fno-load-external-specializations-lazily` too, it implies that I missed something : (

CC: @ilya-biryukov @hahnjo 

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


More information about the cfe-commits mailing list