From 772553c418344b6943a468b79e043180840eb255 Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Fri, 9 Jun 2017 01:36:10 +0000 Subject: Remove 'Filename' parameter from BeginSourceFileAction. No-one was using this, and it's not meaningful in general -- FrontendActions can be run on inputs that don't have a corresponding source file. The current frontend input can be obtained by asking the FrontendAction if any future action actually needs it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@305045 91177308-0d34-0410-b5e6-96231b3b80d8 --- unittests/Frontend/FrontendActionTest.cpp | 5 ++--- unittests/Tooling/CommentHandlerTest.cpp | 3 +-- unittests/Tooling/ToolingTest.cpp | 2 +- 3 files changed, 4 insertions(+), 6 deletions(-) (limited to 'unittests') diff --git a/unittests/Frontend/FrontendActionTest.cpp b/unittests/Frontend/FrontendActionTest.cpp index 68181c705c..ce0144538d 100644 --- a/unittests/Frontend/FrontendActionTest.cpp +++ b/unittests/Frontend/FrontendActionTest.cpp @@ -37,12 +37,11 @@ public: bool ActOnEndOfTranslationUnit; std::vector decl_names; - bool BeginSourceFileAction(CompilerInstance &ci, - StringRef filename) override { + bool BeginSourceFileAction(CompilerInstance &ci) override { if (EnableIncrementalProcessing) ci.getPreprocessor().enableIncrementalProcessing(); - return ASTFrontendAction::BeginSourceFileAction(ci, filename); + return ASTFrontendAction::BeginSourceFileAction(ci); } std::unique_ptr CreateASTConsumer(CompilerInstance &CI, diff --git a/unittests/Tooling/CommentHandlerTest.cpp b/unittests/Tooling/CommentHandlerTest.cpp index b42b28b9c9..9c3abdc4b1 100644 --- a/unittests/Tooling/CommentHandlerTest.cpp +++ b/unittests/Tooling/CommentHandlerTest.cpp @@ -70,8 +70,7 @@ private: CommentHandlerAction(CommentHandlerVisitor *Visitor) : TestAction(Visitor) { } - bool BeginSourceFileAction(CompilerInstance &CI, - StringRef FileName) override { + bool BeginSourceFileAction(CompilerInstance &CI) override { CommentHandlerVisitor *V = static_cast(this->Visitor); V->PP = &CI.getPreprocessor(); diff --git a/unittests/Tooling/ToolingTest.cpp b/unittests/Tooling/ToolingTest.cpp index 68b5ed2105..b179f033d3 100644 --- a/unittests/Tooling/ToolingTest.cpp +++ b/unittests/Tooling/ToolingTest.cpp @@ -203,7 +203,7 @@ TEST(ToolInvocation, TestVirtualModulesCompilation) { struct VerifyEndCallback : public SourceFileCallbacks { VerifyEndCallback() : BeginCalled(0), EndCalled(0), Matched(false) {} - bool handleBeginSource(CompilerInstance &CI, StringRef Filename) override { + bool handleBeginSource(CompilerInstance &CI) override { ++BeginCalled; return true; } -- cgit v1.2.3