[clang] c322d32 - Forward WrapperFrontendAction::shouldEraseOutputFiles()
Ben Langmuir via cfe-commits
cfe-commits at lists.llvm.org
Tue Mar 31 16:20:46 PDT 2020
Author: Ben Langmuir
Date: 2020-03-31T16:20:23-07:00
New Revision: c322d328aa331639f647711aee44c5dddfadd337
URL: https://github.com/llvm/llvm-project/commit/c322d328aa331639f647711aee44c5dddfadd337
DIFF: https://github.com/llvm/llvm-project/commit/c322d328aa331639f647711aee44c5dddfadd337.diff
LOG: Forward WrapperFrontendAction::shouldEraseOutputFiles()
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.
Differential Revision: https://reviews.llvm.org/D77180
rdar://61110294
Added:
Modified:
clang/include/clang/Frontend/FrontendAction.h
clang/lib/Frontend/FrontendAction.cpp
Removed:
################################################################################
diff --git a/clang/include/clang/Frontend/FrontendAction.h b/clang/include/clang/Frontend/FrontendAction.h
index e994e24cf5af..c9f9f080c141 100644
--- a/clang/include/clang/Frontend/FrontendAction.h
+++ b/clang/include/clang/Frontend/FrontendAction.h
@@ -312,6 +312,7 @@ class WrapperFrontendAction : public FrontendAction {
bool BeginSourceFileAction(CompilerInstance &CI) override;
void ExecuteAction() override;
void EndSourceFileAction() override;
+ bool shouldEraseOutputFiles() override;
public:
/// Construct a WrapperFrontendAction from an existing action, taking
diff --git a/clang/lib/Frontend/FrontendAction.cpp b/clang/lib/Frontend/FrontendAction.cpp
index 1dc85d967ca0..0155238dd0a8 100644
--- a/clang/lib/Frontend/FrontendAction.cpp
+++ b/clang/lib/Frontend/FrontendAction.cpp
@@ -1081,6 +1081,9 @@ void WrapperFrontendAction::ExecuteAction() {
void WrapperFrontendAction::EndSourceFileAction() {
WrappedAction->EndSourceFileAction();
}
+bool WrapperFrontendAction::shouldEraseOutputFiles() {
+ return WrappedAction->shouldEraseOutputFiles();
+}
bool WrapperFrontendAction::usesPreprocessorOnly() const {
return WrappedAction->usesPreprocessorOnly();
More information about the cfe-commits
mailing list