Changes in driver/cc1.cc [49d3128:c5c0148]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
driver/cc1.cc
r49d3128 rc5c0148 335 335 #endif // __DEBUG_H__ 336 336 337 enum {338 Color_Auto = 0,339 Color_Always = 1,340 Color_Never = 2,341 } color_arg = Color_Auto;342 343 const char * color_names[3] = { "--colors=auto", "--colors=always", "--colors=never" };344 345 337 // process all the arguments 346 338 … … 349 341 if ( prefix( arg, "-" ) ) { 350 342 // strip inappropriate flags 351 352 if ( prefix( arg, "-fdiagnostics-color=" ) ) {353 string choice = arg.substr(20);354 if(choice == "always") color_arg = Color_Always;355 else if(choice == "never" ) color_arg = Color_Never;356 else if(choice == "auto" ) color_arg = Color_Auto;357 } else if ( arg == "-fno-diagnostics-color" ) {358 color_arg = Color_Auto;359 }360 343 361 344 if ( arg == "-quiet" || arg == "-version" || arg == "-fpreprocessed" || … … 457 440 cargs[ncargs++] = cfa_cpp_out.c_str(); 458 441 } // if 459 460 cargs[ncargs++] = color_names[color_arg];461 462 442 cargs[ncargs] = nullptr; // terminate argument list 463 443
Note:
See TracChangeset
for help on using the changeset viewer.