[clang] [clang] Move state out of `PreprocessorOptions` (1/n) (PR #86358)
Jan Svoboda via cfe-commits
cfe-commits at lists.llvm.org
Thu Mar 28 14:02:42 PDT 2024
================
@@ -736,6 +736,19 @@ class Preprocessor {
State ConditionalStackState = Off;
} PreambleConditionalStack;
+ /// Function for getting the dependency preprocessor directives of a file.
+ ///
+ /// These are directives derived from a special form of lexing where the
+ /// source input is scanned for the preprocessor directives that might have an
+ /// effect on the dependencies for a compilation unit.
+ ///
+ /// Enables a client to cache the directives for a file and provide them
+ /// across multiple compiler invocations.
+ /// FIXME: Allow returning an error.
+ using DependencyDirectivesFn = std::function<std::optional<
----------------
jansvoboda11 wrote:
Good point, we should be able to do that.
https://github.com/llvm/llvm-project/pull/86358
More information about the cfe-commits
mailing list