================
@@ -339,6 +341,10 @@ class ModuleDepCollector final : public
DependencyCollector {
std::optional<P1689ModuleInfo> ProvidedStdCXXModule;
std::vector<P1689ModuleInfo> RequiredStdCXXModules;
+ /// A pointer to the preprocessor callback so we can invoke it directly
+ /// if needed.
+ ModuleDepCollectorPP *CollectorPPPtr = nullptr;
----------------
qiongsiwu wrote:
The `Preprocessor` owns the `PPCallbacks`' instance.
`ModuleDepCollector::attachToPreprocessor` creates the `PPCallbacks` and moves
it into the preprocessor. See
https://github.com/llvm/llvm-project/pull/164345/files#diff-6c14c5831345bba33e5cf69af62b76e8fea9d2d70474f6d9ccb024f99212c506R970
It is also the preprocessor who destroy the callbacks through
`removePPCallbacks`. See
https://github.com/llvm/llvm-project/pull/164345/files#diff-d80edc2f8b14e8ad634b54bc14c780e34a3d7c716b8b9811d1f831135b470f5eR1330
https://github.com/llvm/llvm-project/pull/164345
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits