[PATCH] D77180: Forward WrapperFrontendAction::shouldEraseOutputFiles()

Ben Langmuir via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Mar 31 15:28:48 PDT 2020


benlangmuir created this revision.
benlangmuir added a reviewer: akyrtzi.
Herald added subscribers: cfe-commits, dexonsmith.
Herald added a project: clang.

Per the documentation, this class is supposed to forward every virtual
method, but we had missed on (shouldEraseOutputFiles). This fixes using
a wrapped frontend action over the PCH generator when using
-fallow-pch-with-compiler-errors. I do not think any upstream wrapper
actions can test this.

      

rdar://61110294


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D77180

Files:
  clang/include/clang/Frontend/FrontendAction.h
  clang/lib/Frontend/FrontendAction.cpp


Index: clang/lib/Frontend/FrontendAction.cpp
===================================================================
--- clang/lib/Frontend/FrontendAction.cpp
+++ clang/lib/Frontend/FrontendAction.cpp
@@ -1081,6 +1081,9 @@
 void WrapperFrontendAction::EndSourceFileAction() {
   WrappedAction->EndSourceFileAction();
 }
+bool WrapperFrontendAction::shouldEraseOutputFiles() {
+  return WrappedAction->shouldEraseOutputFiles();
+}
 
 bool WrapperFrontendAction::usesPreprocessorOnly() const {
   return WrappedAction->usesPreprocessorOnly();
Index: clang/include/clang/Frontend/FrontendAction.h
===================================================================
--- clang/include/clang/Frontend/FrontendAction.h
+++ clang/include/clang/Frontend/FrontendAction.h
@@ -312,6 +312,7 @@
   bool BeginSourceFileAction(CompilerInstance &CI) override;
   void ExecuteAction() override;
   void EndSourceFileAction() override;
+  bool shouldEraseOutputFiles() override;
 
 public:
   /// Construct a WrapperFrontendAction from an existing action, taking


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D77180.254021.patch
Type: text/x-patch
Size: 1041 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200331/b4e8d560/attachment-0001.bin>


More information about the cfe-commits mailing list