diff options
author | dim <dim@FreeBSD.org> | 2011-06-12 15:46:16 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2011-06-12 15:46:16 +0000 |
commit | c49018d9cce52d8c9f34b44865ec3ba8e89a1488 (patch) | |
tree | c5e9e10bc189de0058aa763c47b9920a8351b7df /include/clang/Tooling/Tooling.h | |
parent | 110eaaceddcec790f7e6a5e3bf1261c9aa1e73ab (diff) | |
download | FreeBSD-src-c49018d9cce52d8c9f34b44865ec3ba8e89a1488.zip FreeBSD-src-c49018d9cce52d8c9f34b44865ec3ba8e89a1488.tar.gz |
Vendor import of clang trunk r132879:
http://llvm.org/svn/llvm-project/cfe/trunk@132879
Diffstat (limited to 'include/clang/Tooling/Tooling.h')
-rw-r--r-- | include/clang/Tooling/Tooling.h | 81 |
1 files changed, 0 insertions, 81 deletions
diff --git a/include/clang/Tooling/Tooling.h b/include/clang/Tooling/Tooling.h deleted file mode 100644 index 6ccccd0..0000000 --- a/include/clang/Tooling/Tooling.h +++ /dev/null @@ -1,81 +0,0 @@ -//===--- Tooling.h - Framework for standalone Clang tools -------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file implements functions to run clang tools standalone instead -// of running them as a plugin. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_CLANG_TOOLING_TOOLING_H -#define LLVM_CLANG_TOOLING_TOOLING_H - -#include "llvm/ADT/StringRef.h" -#include <string> -#include <vector> - -namespace clang { - -class FrontendAction; - -namespace tooling { - -/// \brief Runs (and deletes) the tool on 'Code' with the -fsynatx-only flag. -/// -/// \param ToolAction The action to run over the code. -/// \param Code C++ code. -/// -/// \return - True if 'ToolAction' was successfully executed. -bool RunSyntaxOnlyToolOnCode( - clang::FrontendAction *ToolAction, llvm::StringRef Code); - -/// \brief Runs (and deletes) the tool with the given Clang flags. -/// -/// \param ToolAction The action to run over the code. -/// \param Argc The number of elements in Argv. -/// \param Argv The command line arguments, including the path the binary -/// was started with (Argv[0]). -bool RunToolWithFlags( - clang::FrontendAction* ToolAction, int Argc, char *Argv[]); - -/// \brief Converts a vector<string> into a vector<char*> suitable to pass -/// to main-style functions taking (int Argc, char *Argv[]). -std::vector<char*> CommandLineToArgv(const std::vector<std::string>* Command); - -/// \brief Specifies the working directory and command of a compilation. -struct CompileCommand { - /// \brief The working directory the command was executed from. - std::string Directory; - - /// \brief The command line that was executed. - std::vector<std::string> CommandLine; -}; - -/// \brief Looks up the compile command for 'FileName' in 'JsonDatabase'. -/// -/// \param FileName The path to an input file for which we want the compile -/// command line. If the 'JsonDatabase' was created by CMake, this must be -/// an absolute path inside the CMake source directory which does not have -/// symlinks resolved. -/// -/// \param JsonDatabase A JSON formatted list of compile commands. This lookup -/// command supports only a subset of the JSON standard as written by CMake. -/// -/// \param ErrorMessage If non-empty, an error occurred and 'ErrorMessage' will -/// be set to contain the error message. In this case CompileCommand will -/// contain an empty directory and command line. -/// -/// \see JsonCompileCommandLineDatabase -CompileCommand FindCompileArgsInJsonDatabase( - llvm::StringRef FileName, llvm::StringRef JsonDatabase, - std::string &ErrorMessage); - -} // end namespace tooling -} // end namespace clang - -#endif // LLVM_CLANG_TOOLING_TOOLING_H |