Changes in src/main.cc [cbbd5b48:a16764a6]
- File:
-
- 1 edited
-
src/main.cc (modified) (10 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/main.cc
rcbbd5b48 ra16764a6 1 1 2 // 2 3 // Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo … … 10 11 // Created On : Fri May 15 23:12:02 2015 11 12 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Wed May 2 14:59:02 201813 // Update Count : 4 9013 // Last Modified On : Tue Oct 31 12:22:40 2017 14 // Update Count : 445 14 15 // 15 16 … … 34 35 #include "CodeTools/DeclStats.h" // for printDeclStats 35 36 #include "CodeTools/TrackLoc.h" // for fillLocations 37 #include "Common/PassVisitor.h" 36 38 #include "Common/CompilerError.h" // for CompilerError 37 #include "Common/Heap.h"38 #include "Common/PassVisitor.h"39 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 // } // for181 182 177 parse_cmdline( argc, argv, filename ); // process command-line arguments 183 178 CodeGen::FixMain::setReplaceMain( !nomainp ); … … 359 354 OPTPRINT( "end" ) 360 355 361 362 356 if ( output != &cout ) { 363 357 delete output; … … 390 384 391 385 deleteAll( translationUnit ); 392 HeapStats::printStats();393 386 return 0; 394 387 } // main … … 423 416 opterr = 0; // (global) prevent getopt from printing error messages 424 417 425 bool Werror = false;426 418 int c; 427 while ( (c = getopt_long( argc, argv, "abBcCdefgGlLmnNpqrstTv wW:yzZD:F:", long_opts, &long_index )) != -1 ) {419 while ( (c = getopt_long( argc, argv, "abBcCdefgGlLmnNpqrstTvyzZD:F:", long_opts, &long_index )) != -1 ) { 428 420 switch ( c ) { 429 421 case Ast: … … 461 453 yydebug = true; 462 454 break; 463 case 'G': // dump AST after instantiate generics455 case 'G': // dump AST after instantiate generics 464 456 genericsp = true; 465 457 break; … … 509 501 case 'v': // dump AST after decl validation pass 510 502 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 } // if529 SemanticWarning_Set( warning, s );530 } // if531 503 break; 532 504 case 'y': // dump AST on error … … 558 530 } // switch 559 531 } // while 560 561 if ( Werror ) {562 SemanticWarning_WarningAsError();563 } // if564 // for ( const auto w : WarningFormats ) {565 // cout << w.name << ' ' << (int)w.severity << endl;566 // } // for567 532 } // parse_cmdline 568 533
Note:
See TracChangeset
for help on using the changeset viewer.