Changeset 49d3128
- Timestamp:
- Nov 21, 2019, 3:53:39 PM (6 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- 2909b515, c701332a
- Parents:
- 1a69a90
- Files:
-
- 2 edited
-
driver/cc1.cc (modified) (3 diffs)
-
src/main.cc (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
driver/cc1.cc
r1a69a90 r49d3128 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 337 345 // process all the arguments 338 346 … … 341 349 if ( prefix( arg, "-" ) ) { 342 350 // 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 } 343 360 344 361 if ( arg == "-quiet" || arg == "-version" || arg == "-fpreprocessed" || … … 440 457 cargs[ncargs++] = cfa_cpp_out.c_str(); 441 458 } // if 459 460 cargs[ncargs++] = color_names[color_arg]; 461 442 462 cargs[ncargs] = nullptr; // terminate argument list 443 463 -
src/main.cc
r1a69a90 r49d3128 431 431 432 432 static const char * description[] = { 433 " Use color in diagnostics. WHEN is ‘never’, ‘always’, or ‘auto’.",// -c434 "wait for gdb to attach", // -g435 "print help message", // -h436 "generate libcfa.c", // -l437 "generate line marks", // -L438 "do not replace main", // -m439 "do not generate line marks", // -N440 "do not read prelude", // -n433 "diagnostic color: never, always, or auto.", // -c 434 "wait for gdb to attach", // -g 435 "print help message", // -h 436 "generate libcfa.c", // -l 437 "generate line marks", // -L 438 "do not replace main", // -m 439 "do not generate line marks", // -N 440 "do not read prelude", // -n 441 441 "generate prototypes for prelude functions", // -p 442 "print", // -P442 "print", // -P 443 443 "<directory> prelude directory for debug/nodebug", // no flag 444 444 "<option-list> enable profiling information:\n counters,heap,time,all,none", // -S 445 "building cfa standard lib", // -t446 "", // -w447 "", // -W448 "", // -D445 "building cfa standard lib", // -t 446 "", // -w 447 "", // -W 448 "", // -D 449 449 }; // description 450 450
Note:
See TracChangeset
for help on using the changeset viewer.