Skip to content
Snippets Groups Projects
Commit 81cc955f authored by Zhongxing Xu's avatar Zhongxing Xu
Browse files

add -analyze-function option.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107463 91177308-0d34-0410-b5e6-96231b3b80d8
parent 9b80ceba
No related branches found
No related tags found
No related merge requests found
......@@ -26,8 +26,12 @@ using namespace idx;
static llvm::cl::list<std::string>
InputFilenames(llvm::cl::Positional, llvm::cl::desc("<input AST files>"));
static llvm::cl::opt<bool> ViewCallGraph("view-call-graph",
llvm::cl::desc("Display the call graph."));
static llvm::cl::opt<bool>
ViewCallGraph("view-call-graph", llvm::cl::desc("Display the call graph."));
static llvm::cl::opt<std::string>
AnalyzeFunction("analyze-function",
llvm::cl::desc("Specify the entry function."));
int main(int argc, char **argv) {
llvm::cl::ParseCommandLineOptions(argc, argv, "clang-wpa");
......@@ -61,4 +65,10 @@ int main(int argc, char **argv) {
CG->ViewCallGraph();
return 0;
}
if (AnalyzeFunction.empty())
return 0;
llvm::outs() << "Analyze function: " << AnalyzeFunction << '\n';
return 0;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment