iains added a comment.

In D121098#3378375 <https://reviews.llvm.org/D121098#3378375>, @ChuanqiXu wrote:

> It lacks tests. This is not NFC, right?

Right, (there are tests with the next patch which introduces the mechanism for 
producing the pre-processed output) 
but, I will find a suitable one for this...

> ---
>
> I am a little bit confused for the intuition. Couldn't we just import the 
> pre-processed header? What's the problem? Could you elaborate on this?

We cannot import a pre-processed file; the preprocessed file is still source 
code, not a CMI.

In addition, the pre-processor output for a header unit requires further 
pre-processing on read.
This is because a header unit actually preserves some of the pre-processor 
information [macro definitions] (which would normally be discarded after phase 
4).

Header units are identifiable by a name (in common with GCC, we make the name 
== the path by which the header is specified) -- that name is intentionally not 
a  legal named module name (neither is it, in general, a legal identifier).


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D121098/new/

https://reviews.llvm.org/D121098

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to