本文整理汇总了C++中SgProject::numberOfNodesInSubtree方法的典型用法代码示例。如果您正苦于以下问题:C++ SgProject::numberOfNodesInSubtree方法的具体用法?C++ SgProject::numberOfNodesInSubtree怎么用?C++ SgProject::numberOfNodesInSubtree使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SgProject
的用法示例。
在下文中一共展示了SgProject::numberOfNodesInSubtree方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
//.........这里部分代码省略.........
}
if (args.count("csv-at-analysis")) {
csvAddressTakenResultFileName=args["csv-at-analysis"].as<string>().c_str();
option_at_analysis=true;
}
if (args.count("csv-stable")) {
option_csv_stable=true;
}
if (args.count("no-topological-sort")) {
option_no_topological_sort=true;
}
// clean up string-options in argv
for (int i=1; i<argc; ++i) {
if (string(argv[i]) == "--prefix"
|| string(argv[i]) == "--csv-fi-constanalysis"
|| string(argv[i]) == "--csv-at-analysis"
|| string(argv[i]) == "--csv-deadcode-unreachable"
|| string(argv[i]) == "--csv-deadcode-deadstore"
) {
// do not confuse ROSE frontend
argv[i] = strdup("");
assert(i+1<argc);
argv[i+1] = strdup("");
}
}
cout << "INIT: Parsing and creating AST."<<endl;
boolOptions.registerOption("semantic-fold",false); // temporary
boolOptions.registerOption("post-semantic-fold",false); // temporary
SgProject* root = frontend(argc,argv);
if(option_trace) {
cout << "TRACE: AST node count: " << root->numberOfNodesInSubtree() << endl;
}
// AstTests::runAllTests(root);
if(option_stats) {
SPRAY::ProgramStatistics::printBasicCodeInfo(root);
}
cout<<"STATUS: computing variableid mapping"<<endl;
ProgramAbstractionLayer* programAbstractionLayer=new ProgramAbstractionLayer();
programAbstractionLayer->initialize(root);
if (args.count("print-varid-mapping-array")) {
programAbstractionLayer->getVariableIdMapping()->setModeVariableIdForEachArrayElement(true);
}
#if 0
IOLabeler* iolabeler=new IOLabeler(root,&variableIdMapping);
//cout<<"IOLabelling:\n"<<iolabeler->toString()<<endl;
#endif
if (args.count("print-varid-mapping")||args.count("print-varid-mapping-array")) {
programAbstractionLayer->getVariableIdMapping()->toStream(cout);
return 0;
}
if(args.count("print-label-mapping")) {
cout<<(programAbstractionLayer->getLabeler()->toString());
return 0;
}
if(args.count("icfg-dot")) {
CFAnalysis* cfAnalysis=new CFAnalysis(programAbstractionLayer->getLabeler());
Flow flow=cfAnalysis->flow(root);