vsapsai created this revision. vsapsai added a reviewer: rsmith. Herald added subscribers: dexonsmith, jkorous.
Fixes `-emit-header-module` when GenerateHeaderModuleAction is wrapped by another frontend action. rdar://problem/47302588 https://reviews.llvm.org/D56766 Files: clang/include/clang/Frontend/FrontendAction.h clang/lib/Frontend/FrontendAction.cpp Index: clang/lib/Frontend/FrontendAction.cpp =================================================================== --- clang/lib/Frontend/FrontendAction.cpp +++ clang/lib/Frontend/FrontendAction.cpp @@ -1045,6 +1045,9 @@ 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) { Index: clang/include/clang/Frontend/FrontendAction.h =================================================================== --- clang/include/clang/Frontend/FrontendAction.h +++ clang/include/clang/Frontend/FrontendAction.h @@ -305,6 +305,7 @@ 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;
Index: clang/lib/Frontend/FrontendAction.cpp =================================================================== --- clang/lib/Frontend/FrontendAction.cpp +++ clang/lib/Frontend/FrontendAction.cpp @@ -1045,6 +1045,9 @@ 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) { Index: clang/include/clang/Frontend/FrontendAction.h =================================================================== --- clang/include/clang/Frontend/FrontendAction.h +++ clang/include/clang/Frontend/FrontendAction.h @@ -305,6 +305,7 @@ 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;
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits