From: Volodymyr Sapsai Date: Thu, 17 Jan 2019 00:20:43 +0000 (+0000) Subject: [Frontend] Make WrapperFrontendAction call WrappedAction.PrepareToExecuteAction. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5d313d9af53d337729aee86c90e48763547370b7;p=clang [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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@351402 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/Frontend/FrontendAction.h b/include/clang/Frontend/FrontendAction.h index 22314386e0..530849537a 100644 --- a/include/clang/Frontend/FrontendAction.h +++ b/include/clang/Frontend/FrontendAction.h @@ -305,6 +305,7 @@ class WrapperFrontendAction : public FrontendAction { std::unique_ptr WrappedAction; protected: + bool PrepareToExecuteAction(CompilerInstance &CI) override; std::unique_ptr CreateASTConsumer(CompilerInstance &CI, StringRef InFile) override; bool BeginInvocation(CompilerInstance &CI) override; diff --git a/lib/Frontend/FrontendAction.cpp b/lib/Frontend/FrontendAction.cpp index f5226380b4..9ab8001b00 100644 --- a/lib/Frontend/FrontendAction.cpp +++ b/lib/Frontend/FrontendAction.cpp @@ -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 WrapperFrontendAction::CreateASTConsumer(CompilerInstance &CI, StringRef InFile) {