Changes in src/main.cc [a16764a6:cbbd5b48]
- File:
-
- 1 edited
-
src/main.cc (modified) (10 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/main.cc
ra16764a6 rcbbd5b48 1 2 1 // 3 2 // Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo … … 11 10 // Created On : Fri May 15 23:12:02 2015 12 11 // Last Modified By : Peter A. Buhr 13 // Last Modified On : Tue Oct 31 12:22:40 201714 // Update Count : 4 4512 // Last Modified On : Wed May 2 14:59:02 2018 13 // Update Count : 490 15 14 // 16 15 … … 35 34 #include "CodeTools/DeclStats.h" // for printDeclStats 36 35 #include "CodeTools/TrackLoc.h" // for fillLocations 36 #include "Common/CompilerError.h" // for CompilerError 37 #include "Common/Heap.h" 37 38 #include "Common/PassVisitor.h" 38 #include "Common/CompilerError.h" // for CompilerError39 39 #include "Common/SemanticError.h" // for SemanticError 40 40 #include "Common/UnimplementedError.h" // for UnimplementedError … … 175 175 signal( SIGABRT, sigAbortHandler ); 176 176 177 // std::cout << "main" << std::endl; 178 // for ( int i = 0; i < argc; i += 1 ) { 179 // std::cout << '\t' << argv[i] << std::endl; 180 // } // for 181 177 182 parse_cmdline( argc, argv, filename ); // process command-line arguments 178 183 CodeGen::FixMain::setReplaceMain( !nomainp ); … … 354 359 OPTPRINT( "end" ) 355 360 361 356 362 if ( output != &cout ) { 357 363 delete output; … … 384 390 385 391 deleteAll( translationUnit ); 392 HeapStats::printStats(); 386 393 return 0; 387 394 } // main … … 416 423 opterr = 0; // (global) prevent getopt from printing error messages 417 424 425 bool Werror = false; 418 426 int c; 419 while ( (c = getopt_long( argc, argv, "abBcCdefgGlLmnNpqrstTv yzZD:F:", long_opts, &long_index )) != -1 ) {427 while ( (c = getopt_long( argc, argv, "abBcCdefgGlLmnNpqrstTvwW:yzZD:F:", long_opts, &long_index )) != -1 ) { 420 428 switch ( c ) { 421 429 case Ast: … … 453 461 yydebug = true; 454 462 break; 455 case 'G': // dump AST after instantiate generics463 case 'G': // dump AST after instantiate generics 456 464 genericsp = true; 457 465 break; … … 501 509 case 'v': // dump AST after decl validation pass 502 510 validp = true; 511 break; 512 case 'w': 513 SemanticWarning_SuppressAll(); 514 break; 515 case 'W': 516 if ( strcmp( optarg, "all" ) == 0 ) { 517 SemanticWarning_EnableAll(); 518 } else if ( strcmp( optarg, "error" ) == 0 ) { 519 Werror = true; 520 } else { 521 char * warning = optarg; 522 Severity s; 523 if ( strncmp( optarg, "no-", 3 ) == 0 ) { 524 warning += 3; 525 s = Severity::Suppress; 526 } else { 527 s = Severity::Warn; 528 } // if 529 SemanticWarning_Set( warning, s ); 530 } // if 503 531 break; 504 532 case 'y': // dump AST on error … … 530 558 } // switch 531 559 } // while 560 561 if ( Werror ) { 562 SemanticWarning_WarningAsError(); 563 } // if 564 // for ( const auto w : WarningFormats ) { 565 // cout << w.name << ' ' << (int)w.severity << endl; 566 // } // for 532 567 } // parse_cmdline 533 568
Note:
See TracChangeset
for help on using the changeset viewer.