diff options
author | dim <dim@FreeBSD.org> | 2013-04-08 18:45:10 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2013-04-08 18:45:10 +0000 |
commit | c72c57c9e9b69944e3e009cd5e209634839581d3 (patch) | |
tree | 4fc2f184c499d106f29a386c452b49e5197bf63d /include/clang/Tooling/Tooling.h | |
parent | 5b20025c30d23d521e12c1f33ec8fa6b821952cd (diff) | |
download | FreeBSD-src-c72c57c9e9b69944e3e009cd5e209634839581d3.zip FreeBSD-src-c72c57c9e9b69944e3e009cd5e209634839581d3.tar.gz |
Vendor import of clang trunk r178860:
http://llvm.org/svn/llvm-project/cfe/trunk@178860
Diffstat (limited to 'include/clang/Tooling/Tooling.h')
-rw-r--r-- | include/clang/Tooling/Tooling.h | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/include/clang/Tooling/Tooling.h b/include/clang/Tooling/Tooling.h index a03bcb1..27e5a0a 100644 --- a/include/clang/Tooling/Tooling.h +++ b/include/clang/Tooling/Tooling.h @@ -30,14 +30,14 @@ #ifndef LLVM_CLANG_TOOLING_TOOLING_H #define LLVM_CLANG_TOOLING_TOOLING_H -#include "llvm/ADT/StringMap.h" -#include "llvm/ADT/Twine.h" #include "clang/Basic/FileManager.h" #include "clang/Basic/LLVM.h" #include "clang/Driver/Util.h" #include "clang/Frontend/FrontendAction.h" #include "clang/Tooling/ArgumentsAdjusters.h" #include "clang/Tooling/CompilationDatabase.h" +#include "llvm/ADT/StringMap.h" +#include "llvm/ADT/Twine.h" #include <string> #include <vector> @@ -151,11 +151,10 @@ class ToolInvocation { bool runInvocation(const char *BinaryName, clang::driver::Compilation *Compilation, - clang::CompilerInvocation *Invocation, - const clang::driver::ArgStringList &CC1Args); + clang::CompilerInvocation *Invocation); std::vector<std::string> CommandLine; - llvm::OwningPtr<FrontendAction> ToolAction; + OwningPtr<FrontendAction> ToolAction; FileManager *Files; // Maps <file name> -> <file content>. llvm::StringMap<StringRef> MappedFileContents; @@ -179,6 +178,8 @@ class ClangTool { ClangTool(const CompilationDatabase &Compilations, ArrayRef<std::string> SourcePaths); + virtual ~ClangTool() {} + /// \brief Map a virtual file to be used while running the tool. /// /// \param FilePath The path at which the content will be mapped. @@ -195,7 +196,7 @@ class ClangTool { /// \param ActionFactory Factory generating the frontend actions. The function /// takes ownership of this parameter. A new action is generated for every /// processed translation unit. - int run(FrontendActionFactory *ActionFactory); + virtual int run(FrontendActionFactory *ActionFactory); /// \brief Returns the file manager used in the tool. /// @@ -210,7 +211,7 @@ class ClangTool { // Contains a list of pairs (<file name>, <file content>). std::vector< std::pair<StringRef, StringRef> > MappedFileContents; - llvm::OwningPtr<ArgumentsAdjuster> ArgsAdjuster; + OwningPtr<ArgumentsAdjuster> ArgsAdjuster; }; template <typename T> @@ -244,7 +245,7 @@ inline FrontendActionFactory *newFrontendActionFactory( : ConsumerFactory(ConsumerFactory), EndCallback(EndCallback) {} clang::ASTConsumer *CreateASTConsumer(clang::CompilerInstance &, - llvm::StringRef) { + StringRef) { return ConsumerFactory->newASTConsumer(); } |