Skip to content

Commit c322d32

Browse files
committed
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
1 parent 39ada46 commit c322d32

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

clang/include/clang/Frontend/FrontendAction.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -312,6 +312,7 @@ class WrapperFrontendAction : public FrontendAction {
312312
bool BeginSourceFileAction(CompilerInstance &CI) override;
313313
void ExecuteAction() override;
314314
void EndSourceFileAction() override;
315+
bool shouldEraseOutputFiles() override;
315316

316317
public:
317318
/// Construct a WrapperFrontendAction from an existing action, taking

clang/lib/Frontend/FrontendAction.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1081,6 +1081,9 @@ void WrapperFrontendAction::ExecuteAction() {
10811081
void WrapperFrontendAction::EndSourceFileAction() {
10821082
WrappedAction->EndSourceFileAction();
10831083
}
1084+
bool WrapperFrontendAction::shouldEraseOutputFiles() {
1085+
return WrappedAction->shouldEraseOutputFiles();
1086+
}
10841087

10851088
bool WrapperFrontendAction::usesPreprocessorOnly() const {
10861089
return WrappedAction->usesPreprocessorOnly();

0 commit comments

Comments
 (0)