[all-commits] [llvm/llvm-project] 85b135: [C++20][Modules][HU 5/5] Add fdirectives-only mode...
iains via All-commits
all-commits at lists.llvm.org
Sun Mar 27 23:38:42 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 85b1354098ba0a665fdd47204d0e53e63d09d9ab
https://github.com/llvm/llvm-project/commit/85b1354098ba0a665fdd47204d0e53e63d09d9ab
Author: Iain Sandoe <iain at sandoe.co.uk>
Date: 2022-03-28 (Mon, 28 Mar 2022)
Changed paths:
M clang/include/clang/Driver/Options.td
M clang/include/clang/Frontend/PreprocessorOutputOptions.h
M clang/lib/Frontend/CompilerInvocation.cpp
M clang/lib/Frontend/PrintPreprocessedOutput.cpp
A clang/test/Modules/cxx20-hu-06.cpp
Log Message:
-----------
[C++20][Modules][HU 5/5] Add fdirectives-only mode for preprocessing output.
When the -fdirectives-only option is used together with -E, the preprocessor
output reflects evaluation of if/then/else directives.
As such, it preserves defines and undefs of macros that are still live after
such processing. The intent is that this output could be consumed as input
to generate considered a C++20 header unit.
We strip out any (unused) defines that come from built-in, built-in-file or
command line; these are re-added when the preprocessed source is consumed.
Differential Revision: https://reviews.llvm.org/D121099
More information about the All-commits
mailing list