[PATCH] D121591: [C++20][Modules][Driver][HU 4/N] Add fdirectives-only mode for preprocessing output.

Iain Sandoe via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 16 03:48:14 PDT 2022


iains added a comment.

In D121591#3381348 <https://reviews.llvm.org/D121591#3381348>, @ChuanqiXu wrote:

> Oh, I found all the series of patches looks confusing to me. Maybe due to that I lack a use experience with header unit. I really couldn't judge if it is necessary or useful. Could you elaborate more **end** use cases? For example, I could understand the sentence:
>
>> Thus it preserves macros that are still live after such processing.
>> This output can be consumed by a second compilation to produce a header unit.
>
> But where could it be useful? I think this is worth mentioning.

OK - I could but the uses of pre-processed output are not really novel to header units?

as I noted elsewhere:

1. usually it is an aid to debugging / problem reporting (since the pre-processed output flattens included headers)
2. in the case of a header unit, actually there could be a purpose in scanning the pre-processed output to determine the dependencies in force //**after**// directives have been processed.

> ---
>
> Note: After the 2 series of patches, I think it is necessary to edit the Release Note and the command line documents.

Ah good catch, I forgot that _ will do an additional patch,


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D121591



More information about the cfe-commits mailing list