Changes in src/main.cc [6a625de:0689cd9]
- File:
-
- 1 edited
-
src/main.cc (modified) (22 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/main.cc
r6a625de r0689cd9 7 7 // main.cc -- 8 8 // 9 // Author : Peter Buhr and Rob Schluntz9 // Author : Richard C. Bilson 10 10 // Created On : Fri May 15 23:12:02 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Fri May 3 16:10:52 201913 // Update Count : 59912 // Last Modified On : Wed Dec 26 08:11:19 2018 13 // Update Count : 499 14 14 // 15 15 … … 24 24 #include <fstream> // for ofstream 25 25 #include <iostream> // for operator<<, basic_ostream 26 #include <iomanip>27 26 #include <iterator> // for back_inserter 28 27 #include <list> // for list … … 38 37 #include "CodeTools/TrackLoc.h" // for fillLocations 39 38 #include "Common/CompilerError.h" // for CompilerError 40 #include "Common/ Stats.h"39 #include "Common/Heap.h" 41 40 #include "Common/PassVisitor.h" 42 // #include "AST/Pass.hpp"43 41 #include "Common/SemanticError.h" // for SemanticError 44 42 #include "Common/UnimplementedError.h" // for UnimplementedError … … 67 65 using namespace std; 68 66 69 static void NewPass( const char * const name ) { 70 Stats::Heap::newPass( name ); 71 using namespace Stats::Counters; 72 { 73 static auto group = build<CounterGroup>( "Pass Visitor" ); 74 auto pass = build<CounterGroup>( name, group ); 75 pass_visitor_stats.depth = 0; 76 pass_visitor_stats.avg = build<AverageCounter<double>>( "Average Depth", pass ); 77 pass_visitor_stats.max = build<MaxCounter<double>>( "Max Depth", pass ); 78 } 79 { 80 static auto group = build<CounterGroup>( "Syntax Node" ); 81 auto pass = build<CounterGroup>( name, group ); 82 BaseSyntaxNode::new_nodes = build<SimpleCounter>( "Allocs", pass ); 83 } 84 } 85 86 #define PASS( name, pass ) \ 67 #define PASS(name, pass) \ 87 68 if ( errorp ) { cerr << name << endl; } \ 88 NewPass(name); \ 89 Stats::Time::StartBlock(name); \ 90 pass; \ 91 Stats::Time::StopBlock(); 69 HeapStats::newPass(name); \ 70 pass; 92 71 93 72 LinkageSpec::Spec linkage = LinkageSpec::Cforall; … … 95 74 DeclarationNode * parseTree = nullptr; // program parse tree 96 75 97 st atic std::string PreludeDirector = "";76 std::string PreludeDirector = ""; 98 77 99 78 static void parse_cmdline( int argc, char *argv[], const char *& filename ); … … 151 130 } // backtrace 152 131 153 staticvoid sigSegvBusHandler( int sig_num ) {132 void sigSegvBusHandler( int sig_num ) { 154 133 cerr << "*CFA runtime error* program cfa-cpp terminated with " 155 134 << (sig_num == SIGSEGV ? "segment fault" : "bus error") … … 157 136 backtrace( 2 ); // skip first 2 stack frames 158 137 //_exit( EXIT_FAILURE ); 159 abort(); // cause core dump for debugging138 abort(); 160 139 } // sigSegvBusHandler 161 140 162 staticvoid sigAbortHandler( __attribute__((unused)) int sig_num ) {141 void sigAbortHandler( __attribute__((unused)) int sig_num ) { 163 142 backtrace( 6 ); // skip first 6 stack frames 164 143 signal( SIGABRT, SIG_DFL); // reset default signal handler 165 raise( SIGABRT ); // reraise SIGABRT144 raise( SIGABRT ); // reraise SIGABRT 166 145 } // sigAbortHandler 167 146 … … 169 148 int main( int argc, char * argv[] ) { 170 149 FILE * input; // use FILE rather than istream because yyin is FILE 171 ostream * output = & cout;172 const char * filename = nullptr;150 ostream *output = & cout; 151 const char *filename = nullptr; 173 152 list< Declaration * > translationUnit; 174 153 … … 202 181 } // if 203 182 204 Stats::Time::StartGlobal();205 NewPass("Parse");206 Stats::Time::StartBlock("Parse");207 208 183 // read in the builtins, extras, and the prelude 209 184 if ( ! nopreludep ) { // include gcc builtins … … 240 215 parseTree->printList( cout ); 241 216 delete parseTree; 242 return EXIT_SUCCESS;217 return 0; 243 218 } // if 244 219 … … 249 224 if ( astp ) { 250 225 dump( translationUnit ); 251 return EXIT_SUCCESS;226 return 0; 252 227 } // if 253 228 … … 256 231 // works okay for now. 257 232 CodeTools::fillLocations( translationUnit ); 258 Stats::Time::StopBlock();259 233 260 234 // add the assignment statement after the initialization of a type parameter 261 PASS( " Validate", SymTab::validate( translationUnit, symtabp ) );235 PASS( "validate", SymTab::validate( translationUnit, symtabp ) ); 262 236 if ( symtabp ) { 263 237 deleteAll( translationUnit ); 264 return EXIT_SUCCESS;238 return 0; 265 239 } // if 266 240 … … 268 242 PassVisitor<ResolvExpr::AlternativePrinter> printer( cout ); 269 243 acceptAll( translationUnit, printer ); 270 return EXIT_SUCCESS;244 return 0; 271 245 } // if 272 246 273 247 if ( validp ) { 274 248 dump( translationUnit ); 275 return EXIT_SUCCESS;276 } // if 277 278 PASS( " FixLabels", ControlStruct::fixLabels( translationUnit ) );279 PASS( " FixNames", CodeGen::fixNames( translationUnit ) );280 PASS( " GenInit", InitTweak::genInit( translationUnit ) );281 PASS( " Expand MemberTuples" , Tuples::expandMemberTuples( translationUnit ) );249 return 0; 250 } // if 251 252 PASS( "fixLabels", ControlStruct::fixLabels( translationUnit ) ); 253 PASS( "fixNames", CodeGen::fixNames( translationUnit ) ); 254 PASS( "genInit", InitTweak::genInit( translationUnit ) ); 255 PASS( "expandMemberTuples" , Tuples::expandMemberTuples( translationUnit ) ); 282 256 if ( libcfap ) { 283 257 // generate the bodies of cfa library functions … … 288 262 CodeTools::printDeclStats( translationUnit ); 289 263 deleteAll( translationUnit ); 290 return EXIT_SUCCESS;291 } // if264 return 0; 265 } 292 266 293 267 if ( bresolvep ) { 294 268 dump( translationUnit ); 295 return EXIT_SUCCESS;269 return 0; 296 270 } // if 297 271 … … 300 274 if ( resolvprotop ) { 301 275 CodeTools::dumpAsResolvProto( translationUnit ); 302 return EXIT_SUCCESS;303 } // if304 305 PASS( " Resolve", ResolvExpr::resolve( translationUnit ) );276 return 0; 277 } 278 279 PASS( "resolve", ResolvExpr::resolve( translationUnit ) ); 306 280 if ( exprp ) { 307 281 dump( translationUnit ); 308 return EXIT_SUCCESS;282 return 0; 309 283 } // if 310 284 311 285 // fix ObjectDecl - replaces ConstructorInit nodes 312 PASS( " FixInit", InitTweak::fix( translationUnit, buildingLibrary() ) );286 PASS( "fixInit", InitTweak::fix( translationUnit, buildingLibrary() ) ); 313 287 if ( ctorinitp ) { 314 288 dump ( translationUnit ); 315 return EXIT_SUCCESS;316 } // if 317 318 PASS( " Expand UniqueExpr", Tuples::expandUniqueExpr( translationUnit ) ); // xxx - is this the right place for this? want to expand ASAP so tha, sequent passes don't need to worry about double-visiting a unique expr - needs to go after InitTweak::fix so that copy constructed return declarations are reused319 320 PASS( " TranslateEHM" , ControlStruct::translateEHM( translationUnit ) );321 322 PASS( " GenWaitfor" , Concurrency::generateWaitFor( translationUnit ) );323 324 PASS( " ConvertSpecializations", GenPoly::convertSpecializations( translationUnit ) ); // needs to happen before tuple types are expanded325 326 PASS( " ExpandTuples", Tuples::expandTuples( translationUnit ) ); // xxx - is this the right place for this?289 return 0; 290 } // if 291 292 PASS( "expandUniqueExpr", Tuples::expandUniqueExpr( translationUnit ) ); // xxx - is this the right place for this? want to expand ASAP so tha, sequent passes don't need to worry about double-visiting a unique expr - needs to go after InitTweak::fix so that copy constructed return declarations are reused 293 294 PASS( "translateEHM" , ControlStruct::translateEHM( translationUnit ) ); 295 296 PASS( "generateWaitfor" , Concurrency::generateWaitFor( translationUnit ) ); 297 298 PASS( "convertSpecializations", GenPoly::convertSpecializations( translationUnit ) ); // needs to happen before tuple types are expanded 299 300 PASS( "expandTuples", Tuples::expandTuples( translationUnit ) ); // xxx - is this the right place for this? 327 301 328 302 if ( tuplep ) { 329 303 dump( translationUnit ); 330 return EXIT_SUCCESS;331 } // if332 333 PASS( " Virtual ExpandCasts", Virtual::expandCasts( translationUnit ) ); // Must come after translateEHM334 335 PASS( " InstantiateGenerics", GenPoly::instantiateGeneric( translationUnit ) );304 return 0; 305 } 306 307 PASS( "virtual expandCasts", Virtual::expandCasts( translationUnit ) ); // Must come after translateEHM 308 309 PASS( "instantiateGenerics", GenPoly::instantiateGeneric( translationUnit ) ); 336 310 if ( genericsp ) { 337 311 dump( translationUnit ); 338 return EXIT_SUCCESS;339 } // if340 PASS( " Convert L-Value", GenPoly::convertLvalue( translationUnit ) );312 return 0; 313 } 314 PASS( "convertLvalue", GenPoly::convertLvalue( translationUnit ) ); 341 315 342 316 343 317 if ( bboxp ) { 344 318 dump( translationUnit ); 345 return EXIT_SUCCESS;346 } // if 347 PASS( " Box", GenPoly::box( translationUnit ) );319 return 0; 320 } // if 321 PASS( "box", GenPoly::box( translationUnit ) ); 348 322 349 323 if ( bcodegenp ) { 350 324 dump( translationUnit ); 351 return EXIT_SUCCESS;352 } // if325 return 0; 326 } 353 327 354 328 if ( optind < argc ) { // any commands after the flags and input file ? => output file name … … 357 331 358 332 CodeTools::fillLocations( translationUnit ); 359 PASS( " Code Gen", CodeGen::generate( translationUnit, *output, ! genproto, prettycodegenp, true, linemarks ) );333 PASS( "codegen", CodeGen::generate( translationUnit, *output, ! noprotop, prettycodegenp, true, linemarks ) ); 360 334 361 335 CodeGen::FixMain::fix( *output, (PreludeDirector + "/bootloader.c").c_str() ); … … 373 347 delete output; 374 348 } // if 375 return EXIT_FAILURE;349 return 1; 376 350 } catch ( UnimplementedError &e ) { 377 351 cout << "Sorry, " << e.get_what() << " is not currently implemented" << endl; … … 379 353 delete output; 380 354 } // if 381 return EXIT_FAILURE;355 return 1; 382 356 } catch ( CompilerError &e ) { 383 357 cerr << "Compiler Error: " << e.get_what() << endl; … … 386 360 delete output; 387 361 } // if 388 return EXIT_FAILURE;389 } catch ( ...) {362 return 1; 363 } catch(...) { 390 364 std::exception_ptr eptr = std::current_exception(); 391 365 try { 392 366 if (eptr) { 393 367 std::rethrow_exception(eptr); 394 } else { 395 std::cerr << "Exception Uncaught and Unknown" << std::endl; 396 } // if 368 } 369 else { 370 std::cerr << "Exception Uncaught and Unkown" << std::endl; 371 } 397 372 } catch(const std::exception& e) { 398 373 std::cerr << "Uncaught Exception \"" << e.what() << "\"\n"; 399 } // try400 return EXIT_FAILURE;401 } // try374 } 375 return 1; 376 }// try 402 377 403 378 deleteAll( translationUnit ); 404 Stats::print();405 return EXIT_SUCCESS;379 if(!libcfap && !treep) HeapStats::printStats(); 380 return 0; 406 381 } // main 407 382 408 409 static const char optstring[] = ":hlLmNn:pP:S:twW:D:F:"; 410 411 enum { PreludeDir = 128 }; 412 static struct option long_opts[] = { 413 { "help", no_argument, nullptr, 'h' }, 414 { "libcfa", no_argument, nullptr, 'l' }, 415 { "linemarks", no_argument, nullptr, 'L' }, 416 { "no-main", no_argument, 0, 'm' }, 417 { "no-linemarks", no_argument, nullptr, 'N' }, 418 { "no-prelude", no_argument, nullptr, 'n' }, 419 { "prototypes", no_argument, nullptr, 'p' }, 420 { "print", required_argument, nullptr, 'P' }, 421 { "prelude-dir", required_argument, nullptr, PreludeDir }, 422 { "statistics", required_argument, nullptr, 'S' }, 423 { "tree", no_argument, nullptr, 't' }, 424 { "", no_argument, nullptr, 0 }, // -w 425 { "", no_argument, nullptr, 0 }, // -W 426 { "", no_argument, nullptr, 0 }, // -D 427 { "", no_argument, nullptr, 0 }, // -F 428 { nullptr, 0, nullptr, 0 } 429 }; // long_opts 430 431 static const char * description[] = { 432 "print help message", // -h 433 "generate libcfa.c", // -l 434 "generate line marks", // -L 435 "do not replace main", // -m 436 "do not generate line marks", // -N 437 "do not read prelude", // -n 438 "generate prototypes for prelude functions", // -p 439 "print", // -P 440 "<directory> prelude directory for debug/nodebug", // no flag 441 "<option-list> enable profiling information:\n counters,heap,time,all,none", // -S 442 "build in tree", // -t 443 "", // -w 444 "", // -W 445 "", // -D 446 "", // -F 447 }; // description 448 449 static_assert( sizeof( long_opts ) / sizeof( long_opts[0] ) - 1 == sizeof( description ) / sizeof( description[0] ), "Long opts and description must match" ); 450 451 static struct Printopts { 452 const char * name; 453 int & flag; 454 int val; 455 const char * descript; 456 } printopts[] = { 457 { "altexpr", expraltp, true, "alternatives for expressions" }, 458 { "ascodegen", codegenp, true, "as codegen rather than AST" }, 459 { "ast", astp, true, "AST after parsing" }, 460 { "astdecl", validp, true, "AST after declaration validation pass" }, 461 { "asterr", errorp, true, "AST on error" }, 462 { "astexpr", exprp, true, "AST after expression analysis" }, 463 { "astgen", genericsp, true, "AST after instantiate generics" }, 464 { "box", bboxp, true, "before box step" }, 465 { "ctordtor", ctorinitp, true, "after ctor/dtor are replaced" }, 466 { "codegen", bcodegenp, true, "before code generation" }, 467 { "declstats", declstatsp, true, "code property statistics" }, 468 { "parse", yydebug, true, "yacc (parsing) debug information" }, 469 { "pretty", prettycodegenp, true, "prettyprint for ascodegen flag" }, 470 { "resolver", bresolvep, true, "before resolver step" }, 471 { "rproto", resolvprotop, true, "resolver-proto instance" }, 472 { "rsteps", resolvep, true, "resolver steps" }, 473 { "symevt", symtabp, true, "symbol table events" }, 474 { "tree", parsep, true, "parse tree" }, 475 { "tuple", tuplep, true, "after tuple expansion" }, 476 }; 477 enum { printoptsSize = sizeof( printopts ) / sizeof( printopts[0] ) }; 478 479 static void usage( char *argv[] ) { 480 cout << "Usage: " << argv[0] << " options are:" << endl; 481 int i = 0, j = 1; // j skips starting colon 482 for ( ; long_opts[i].name != 0 && optstring[j] != '\0'; i += 1, j += 1 ) { 483 if ( long_opts[i].name[0] != '\0' ) { // hidden option, internal usage only 484 if ( strcmp( long_opts[i].name, "prelude-dir" ) != 0 ) { // flag 485 cout << " -" << optstring[j] << ","; 486 } else { // no flag 487 j -= 1; // compensate 488 cout << " "; 489 } // if 490 cout << " --" << left << setw(12) << long_opts[i].name << " "; 491 if ( strcmp( long_opts[i].name, "print" ) == 0 ) { 492 cout << "one of: " << endl; 493 for ( int i = 0; i < printoptsSize; i += 1 ) { 494 cout << setw(10) << " " << left << setw(10) << printopts[i].name << " " << printopts[i].descript << endl; 495 } // for 496 } else { 497 cout << description[i] << endl; 498 } // if 499 } // if 500 if ( optstring[j + 1] == ':' ) j += 1; 501 } // for 502 if ( long_opts[i].name != 0 || optstring[j] != '\0' ) assertf( false, "internal error, mismatch of option flags and names\n" ); 503 exit( EXIT_FAILURE ); 504 } // usage 505 506 static void parse_cmdline( int argc, char * argv[], const char *& filename ) { 383 void parse_cmdline( int argc, char * argv[], const char *& filename ) { 384 enum { Ast, Bbox, Bresolver, CtorInitFix, DeclStats, Expr, ExprAlt, Grammar, LibCFA, Linemarks, Nolinemarks, Nopreamble, Parse, PreludeDir, Prototypes, Resolver, ResolvProto, Symbol, Tree, TupleExpansion, Validate, }; 385 386 static struct option long_opts[] = { 387 { "ast", no_argument, 0, Ast }, 388 { "before-box", no_argument, 0, Bbox }, 389 { "before-resolver", no_argument, 0, Bresolver }, 390 { "ctorinitfix", no_argument, 0, CtorInitFix }, 391 { "decl-stats", no_argument, 0, DeclStats }, 392 { "expr", no_argument, 0, Expr }, 393 { "expralt", no_argument, 0, ExprAlt }, 394 { "grammar", no_argument, 0, Grammar }, 395 { "libcfa", no_argument, 0, LibCFA }, 396 { "line-marks", no_argument, 0, Linemarks }, 397 { "no-line-marks", no_argument, 0, Nolinemarks }, 398 { "no-preamble", no_argument, 0, Nopreamble }, 399 { "parse", no_argument, 0, Parse }, 400 { "prelude-dir", required_argument, 0, PreludeDir }, 401 { "no-prototypes", no_argument, 0, Prototypes }, 402 { "resolver", no_argument, 0, Resolver }, 403 { "resolv-proto", no_argument, 0, ResolvProto }, 404 { "symbol", no_argument, 0, Symbol }, 405 { "tree", no_argument, 0, Tree }, 406 { "tuple-expansion", no_argument, 0, TupleExpansion }, 407 { "validate", no_argument, 0, Validate }, 408 { 0, 0, 0, 0 } 409 }; // long_opts 410 int long_index; 411 507 412 opterr = 0; // (global) prevent getopt from printing error messages 508 413 509 414 bool Wsuppress = false, Werror = false; 510 415 int c; 511 while ( (c = getopt_long( argc, argv, optstring, long_opts, nullptr)) != -1 ) {416 while ( (c = getopt_long( argc, argv, "abBcCdefgGlLmnNpqrRstTvwW:yzZD:F:", long_opts, &long_index )) != -1 ) { 512 417 switch ( c ) { 513 case 'h': // help message 514 usage( argv ); // no return 515 break; 418 case Ast: 419 case 'a': // dump AST 420 astp = true; 421 break; 422 case Bresolver: 423 case 'b': // print before resolver steps 424 bresolvep = true; 425 break; 426 case 'B': // print before box steps 427 bboxp = true; 428 break; 429 case CtorInitFix: 430 case 'c': // print after constructors and destructors are replaced 431 ctorinitp = true; 432 break; 433 case 'C': // print before code generation 434 bcodegenp = true; 435 break; 436 case DeclStats: 437 case 'd': 438 declstatsp = true; 439 break; 440 case Expr: 441 case 'e': // dump AST after expression analysis 442 exprp = true; 443 break; 444 case ExprAlt: 445 case 'f': // print alternatives for expressions 446 expraltp = true; 447 break; 448 case Grammar: 449 case 'g': // bison debugging info (grammar rules) 450 yydebug = true; 451 break; 452 case 'G': // dump AST after instantiate generics 453 genericsp = true; 454 break; 455 case LibCFA: 516 456 case 'l': // generate libcfa.c 517 457 libcfap = true; 518 458 break; 519 case 'L': // generate line marks 459 case Linemarks: 460 case 'L': // print lines marks 520 461 linemarks = true; 521 462 break; 522 case 'm': // do not replace main 523 nomainp = true; 524 break; 525 case 'N': // do not generate line marks 463 case Nopreamble: 464 case 'n': // do not read preamble 465 nopreludep = true; 466 break; 467 case Nolinemarks: 468 case 'N': // suppress line marks 526 469 linemarks = false; 527 470 break; 528 case 'n': // do not read prelude 529 nopreludep = true; 530 break; 531 case 'p': // generate prototypes for prelude functions 532 genproto = true; 533 break; 534 case 'P': // print options 535 for ( int i = 0;; i += 1 ) { 536 if ( i == printoptsSize ) { 537 cout << "Unknown --print option " << optarg << endl; 538 goto Default; 539 } // if 540 if ( strcmp( optarg, printopts[i].name ) == 0 ) { 541 printopts[i].flag = printopts[i].val; 542 break; 543 } // if 544 } // for 545 break; 546 case PreludeDir: // prelude directory for debug/nodebug, hidden 547 PreludeDirector = optarg; 548 break; 549 case 'S': // enable profiling information, argument comma separated list of names 550 Stats::parse_params( optarg ); 551 break; 471 case Prototypes: 472 case 'p': // generate prototypes for preamble functions 473 noprotop = true; 474 break; 475 case PreludeDir: 476 PreludeDirector = optarg; 477 break; 478 case 'm': // don't replace the main 479 nomainp = true; 480 break; 481 case Parse: 482 case 'q': // dump parse tree 483 parsep = true; 484 break; 485 case Resolver: 486 case 'r': // print resolver steps 487 resolvep = true; 488 break; 489 case 'R': // dump resolv-proto instance 490 resolvprotop = true; 491 break; 492 case Symbol: 493 case 's': // print symbol table events 494 symtabp = true; 495 break; 496 case Tree: 552 497 case 't': // build in tree 553 498 treep = true; 554 499 break; 555 case 'w': // suppress all warnings, hidden 500 case TupleExpansion: 501 case 'T': // print after tuple expansion 502 tuplep = true; 503 break; 504 case 'v': // dump AST after decl validation pass 505 validp = true; 506 break; 507 case 'w': 556 508 Wsuppress = true; 557 509 break; 558 case 'W': // coordinate gcc -W with CFA, hidden510 case 'W': 559 511 if ( strcmp( optarg, "all" ) == 0 ) { 560 512 SemanticWarning_EnableAll(); … … 573 525 } // if 574 526 break; 575 case 'D': // ignore -Dxxx, forwarded by cpp, hidden 576 break; 577 case 'F': // source file-name without suffix, hidden 527 case 'y': // dump AST on error 528 errorp = true; 529 break; 530 case 'z': // dump as codegen rather than AST 531 codegenp = true; 532 break; 533 case 'Z': // prettyprint during codegen (i.e. print unmangled names, etc.) 534 prettycodegenp = true; 535 break; 536 case 'D': // ignore -Dxxx 537 break; 538 case 'F': // source file-name without suffix 578 539 filename = optarg; 579 540 break; 580 case '?': // unknown option541 case '?': 581 542 if ( optopt ) { // short option ? 582 cout << "Unknown option -" << (char)optopt << endl;543 assertf( false, "Unknown option: -%c\n", (char)optopt ); 583 544 } else { 584 cout << "Unknown option " << argv[optind - 1] << endl;545 assertf( false, "Unknown option: %s\n", argv[optind - 1] ); 585 546 } // if 586 goto Default; 587 case ':': // missing option 588 if ( optopt ) { // short option ? 589 cout << "Missing option for -" << (char)optopt << endl; 590 } else { 591 cout << "Missing option for " << argv[optind - 1] << endl; 592 } // if 593 goto Default; 594 Default: 547 #if defined(__GNUC__) && __GNUC__ >= 7 548 __attribute__((fallthrough)); 549 #endif 595 550 default: 596 usage( argv ); // no return551 abort(); 597 552 } // switch 598 553 } // while … … 632 587 list< Declaration * > decls; 633 588 634 if ( genproto) {589 if ( noprotop ) { 635 590 filter( translationUnit.begin(), translationUnit.end(), back_inserter( decls ), notPrelude ); 636 591 } else { … … 640 595 // depending on commandline options, either generate code or dump the AST 641 596 if ( codegenp ) { 642 CodeGen::generate( decls, out, ! genproto, prettycodegenp );597 CodeGen::generate( decls, out, ! noprotop, prettycodegenp ); 643 598 } else { 644 599 printAll( decls, out ); 645 } // if600 } 646 601 deleteAll( translationUnit ); 647 602 } // dump
Note:
See TracChangeset
for help on using the changeset viewer.