#include "AST.h"
#include "Debug.h"
#include "llvm/Support/CommandLine.h"
#include "clang/Frontend/CompilerInstance.h"
#include "clang/Frontend/FrontendActions.h"
#include "clang/Tooling/CompilationDatabase.h"
#include "clang/Tooling/Tooling.h"
#include "llvm/Support/PrettyStackTrace.h"
#include <google/protobuf/text_format.h>
Go to the source code of this file.
|
cl::opt< string > | OutputFile ("o", cl::desc("<output file>"), cl::Required) |
|
cl::list< string > | SourcePaths (cl::Positional, cl::desc("<source0> [... <sourceN>]"), cl::OneOrMore) |
|
int | main (int argc, const char **argv) |
|
int main |
( |
int |
argc, |
|
|
const char ** |
argv |
|
) |
| |
Definition at line 63 of file Tool.cpp.
References OutputFile(), tesla::panic(), and SourcePaths().
64 llvm::PrettyStackTraceProgram X(argc, argv);
67 std::vector<const char*> args(argv, argv + argc);
69 args.push_back(
"__TESLA_ANALYSER__");
74 argc = (int) args.size();
75 assert(((
size_t) argc) == args.size());
79 OwningPtr<CompilationDatabase> Compilations(
80 FixedCompilationDatabase::loadFromCommandLine(argc, argv));
84 "Need compilation options, e.g. tesla-analyser foo.c -- -I ../include");
86 cl::ParseCommandLineOptions(argc, argv);
91 return Tool.run(Factory.get());
cl::opt<string> OutputFile |
( |
"o" |
, |
|
|
cl:: |
desc"<output file>", |
|
|
cl::Required |
|
|
) |
| |
cl::list<string> SourcePaths |
( |
cl::Positional |
, |
|
|
cl:: |
desc"<source0> [... <sourceN>]", |
|
|
cl::OneOrMore |
|
|
) |
| |