[Frontend] Make WrapperFrontendAction call WrappedAction.PrepareToExecuteAction.

Fixes `-emit-header-module` when GenerateHeaderModuleAction is wrapped
by another frontend action.

rdar://problem/47302588

Reviewers: rsmith, arphaman

Reviewed By: arphaman

Subscribers: jkorous, dexonsmith, cfe-commits

Differential Revision: https://reviews.llvm.org/D56766

llvm-svn: 351402
This commit is contained in:
Volodymyr Sapsai 2019-01-17 00:20:43 +00:00
parent 7ec7a299a2
commit 4daffc176f
2 changed files with 4 additions and 0 deletions

View File

@ -305,6 +305,7 @@ class WrapperFrontendAction : public FrontendAction {
std::unique_ptr<FrontendAction> WrappedAction;
protected:
bool PrepareToExecuteAction(CompilerInstance &CI) override;
std::unique_ptr<ASTConsumer> CreateASTConsumer(CompilerInstance &CI,
StringRef InFile) override;
bool BeginInvocation(CompilerInstance &CI) override;

View File

@ -1045,6 +1045,9 @@ PreprocessorFrontendAction::CreateASTConsumer(CompilerInstance &CI,
llvm_unreachable("Invalid CreateASTConsumer on preprocessor action!");
}
bool WrapperFrontendAction::PrepareToExecuteAction(CompilerInstance &CI) {
return WrappedAction->PrepareToExecuteAction(CI);
}
std::unique_ptr<ASTConsumer>
WrapperFrontendAction::CreateASTConsumer(CompilerInstance &CI,
StringRef InFile) {