v.g.vassilev added a comment. In D96033#2695748 <https://reviews.llvm.org/D96033#2695748>, @rjmccall wrote:
> In D96033#2695622 <https://reviews.llvm.org/D96033#2695622>, @v.g.vassilev > wrote: > >> Would it make sense to have each `Decl` point to its owning PTU, similarly >> to what we do for the owning module (`Decl::getOwningModule`)? > > I think that's the interface we want, but actually storing the PTU in every > `Decl` that way is probably prohibitive in memory overhead; we need some more > compact way to recover it. But maybe it's okay to do something like that if > we can spare a bit in `Decl`. Richard, thoughts here? Ha, each `Decl` has a `getTranslationUnitDecl()` which may be rewired to point to the PTU... >> In terms of future steps, do you prefer to try implementing what you >> suggested as part of this patch? I would prefer to land this patch and then >> add what we discussed here rather than keep piling to this already bulky >> patch. > > It depends on how much you think your patch is working towards that > architecture. Since this is just infrastructure without much in the way of > Sema/IRGen changes, it's probably fine. I haven't reviewed it yet, though, > sorry. If you could skim through the patch it'd be great! I think the only bit that remotely touches on the new architecture is the `Transaction` class -- it is a pair of vector of decls and an llvm::Module. I think the vector of Decls would become a PTU in future. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D96033/new/ https://reviews.llvm.org/D96033 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits