[clang] [Serialization] Load Specializations Lazily (PR #76774)
Chuanqi Xu via cfe-commits
cfe-commits at lists.llvm.org
Sun Jan 21 23:53:58 PST 2024
ChuanqiXu9 wrote:
> > > > I tried applying this patch to ROOT/Cling and it fails to build because something is of the opinion that `std::is_integral<int>::value` is not true. I don't have time right now to investigate further, but since this is the only change I did it is highly likely that it's caused by this...
> > >
> > >
> > > In that case we need to understand how this patch differs from the one I pasted in phabricator since the one there works for that case I assume.
> >
> >
> > I had a guess. `{ClassTemplateDecl, VarTemplateDecl, FunctionTemplateDecl}::specializations()` will iterate all the specializations. However, after this patch, there are maybe some specializations not loaded at the time of invocation. Then during the process of iterating `specializations()`, it may require to complete the redecl chain to trigger the process of loading specializations. Then boom!
>
> This is also the case with https://reviews.llvm.org/D41416 and we have machinery to deal with that (including https://reviews.llvm.org/D154328)
Got it. So it is not the cause for the problem you saw : (
Would you like to give an reproducer so that I can debug?
https://github.com/llvm/llvm-project/pull/76774
More information about the cfe-commits
mailing list