r351402 - [Frontend] Make WrapperFrontendAction call WrappedAction.PrepareToExecuteAction.
Volodymyr Sapsai via cfe-commits
cfe-commits at lists.llvm.org
Wed Jan 16 16:20:43 PST 2019
Author: vsapsai
Date: Wed Jan 16 16:20:43 2019
New Revision: 351402
URL: http://llvm.org/viewvc/llvm-project?rev=351402&view=rev
Log:
[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
Modified:
cfe/trunk/include/clang/Frontend/FrontendAction.h
cfe/trunk/lib/Frontend/FrontendAction.cpp
Modified: cfe/trunk/include/clang/Frontend/FrontendAction.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Frontend/FrontendAction.h?rev=351402&r1=351401&r2=351402&view=diff
==============================================================================
--- cfe/trunk/include/clang/Frontend/FrontendAction.h (original)
+++ cfe/trunk/include/clang/Frontend/FrontendAction.h Wed Jan 16 16:20:43 2019
@@ -305,6 +305,7 @@ class WrapperFrontendAction : public Fro
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;
Modified: cfe/trunk/lib/Frontend/FrontendAction.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/FrontendAction.cpp?rev=351402&r1=351401&r2=351402&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/FrontendAction.cpp (original)
+++ cfe/trunk/lib/Frontend/FrontendAction.cpp Wed Jan 16 16:20:43 2019
@@ -1045,6 +1045,9 @@ PreprocessorFrontendAction::CreateASTCon
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) {
More information about the cfe-commits
mailing list