aboutsummaryrefslogtreecommitdiff
path: root/include/clang/Frontend/FrontendAction.h
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2010-08-02 15:31:28 +0000
committerDaniel Dunbar <daniel@zuster.org>2010-08-02 15:31:28 +0000
commitf56a488a6bdfe56ca814f37d384afa67c67f9dd5 (patch)
tree31319eac06d434a1e21fe4314ea1c1199e649e01 /include/clang/Frontend/FrontendAction.h
parent9c1845dbed9817520f5a7db8bd80a560c6c6ae6b (diff)
Frontend: Change PluginASTAction::ParseArgs to take a CompilerInstance object
for use in reporting diagnostics. - We don't want to use the Action's own CompilerInstance, because that is only initialized during file processing and I like that invariant. Also, if ParseArgs returns false then abandon execution. Also, remove unused PluginASTAction::PrintHelp virtual method. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110039 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Frontend/FrontendAction.h')
-rw-r--r--include/clang/Frontend/FrontendAction.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/include/clang/Frontend/FrontendAction.h b/include/clang/Frontend/FrontendAction.h
index f6a68bf69e..637458da34 100644
--- a/include/clang/Frontend/FrontendAction.h
+++ b/include/clang/Frontend/FrontendAction.h
@@ -225,8 +225,14 @@ protected:
llvm::StringRef InFile) = 0;
public:
- virtual bool ParseArgs(const std::vector<std::string>& arg) = 0;
- virtual void PrintHelp(llvm::raw_ostream&) = 0;
+ /// ParseArgs - Parse the given plugin command line arguments.
+ ///
+ /// \param CI - The compiler instance, for use in reporting diagnostics.
+ /// \return True if the parsing succeeded; otherwise the plugin will be
+ /// destroyed and no action run. The plugin is responsible for using the
+ /// CompilerInstance's Diagnostic object to report errors.
+ virtual bool ParseArgs(const CompilerInstance &CI,
+ const std::vector<std::string> &arg) = 0;
};
/// PreprocessorFrontendAction - Abstract base class to use for preprocessor