ChuanqiXu9 wrote:

> > BTW, I think `-fmodule-file=` is not a suggested way to introduce BMIs. It 
> > will load the BMIs eagerly. And for named modules, we will load them lazily 
> > according to their name. For header units, may be we can do something with 
> > FID. It matters for cases like:
> > ```
> > #include <...>
> > import xxx;
> > ```
> > 
> > 
> >     
> >       
> >     
> > 
> >       
> >     
> > 
> >     
> >   
> > With `-fmodule-file=<BMI>`, we will load the BMI first and include the 
> > file. But with `-fmodule=<module-name>=<BMI>`, we will include the file 
> > first and load the BMI. It will cause different compilation passes. 
> > Introduce unnecessary inconsistency, which will be a burden to both 
> > developers and users. So I will suggest to load lazily always.
> 
> Yeah, we do actually use `-fmodule-file=<name>=<pcm>` downstream to do the 
> lazily loading. Thank you for the information anyway 🙂

If you did `-fmodule-file=<name>=<pcm>` for header units, I think it is better 
to upstream that first. I think it is more fundamental.

https://github.com/llvm/llvm-project/pull/135147
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to