llvm-project
407a2f23 - [clang] Move state out of `PreprocessorOptions` (1/n) (#86358)

Commit
1 year ago
[clang] Move state out of `PreprocessorOptions` (1/n) (#86358) An instance of `PreprocessorOptions` is part of `CompilerInvocation` which is supposed to be a value type. The `DependencyDirectivesForFile` member is problematic, since it holds an owning reference of the scanning VFS. This makes it not a true value type, and it can keep potentially large chunk of memory (the local cache in the scanning VFS) alive for longer than clients might expect. Let's move it into the `Preprocessor` instead.
Author
Parents
Loading