]> granicus.if.org Git - clang/commitdiff
[Frontend] Make WrapperFrontendAction call WrappedAction.PrepareToExecuteAction.
authorVolodymyr Sapsai <vsapsai@apple.com>
Thu, 17 Jan 2019 00:20:43 +0000 (00:20 +0000)
committerVolodymyr Sapsai <vsapsai@apple.com>
Thu, 17 Jan 2019 00:20:43 +0000 (00:20 +0000)
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

include/clang/Frontend/FrontendAction.h
lib/Frontend/FrontendAction.cpp

index 22314386e060091b99f0f70a84a98eb14affd728..530849537a37e5ee88f461cec131313360f9e203 100644 (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;
index f5226380b4dd5c083107087a5425c41ad8d75659..9ab8001b002a8321d17283298e45f003e398a86f 100644 (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) {