[PATCH] D41365: [clang] Add BeforeExecute method to PrecompiledPreamble

Ilya Biryukov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Dec 19 04:33:32 PST 2017

ilya-biryukov requested changes to this revision.
ilya-biryukov added inline comments.
This revision now requires changes to proceed.

Comment at: include/clang/Frontend/PrecompiledPreamble.h:249
+  /// from a CompilerInstance.
+  virtual void BeforeExecute(CompilerInstance &CI);
   /// Called after FrontendAction::Execute(), but before
The comment seems a bit too specific.
Maybe change it to something like "can be used to store references to various CompilerInstance fields (e.g. SourceManager) that may be interesting to the consumers of other callbacks"

Comment at: lib/Frontend/PrecompiledPreamble.cpp:355
We should probably call it here, right before `Execute`.
Or maybe right before `BeginSourceFile` if we can receive the callbacks while executing `BeginSourceFile`. We should make sure to update the comment if you decide to call it before `BeginSourceFile`.

  rC Clang


More information about the cfe-commits mailing list