mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-09-24 21:30:12 +01:00
Comma seperated selection of allowed phases for trace (#2963)
For `-trace_phase` flag, makes the selection of multiple phases possible by separating them by comma. **Example Usage:** ``` bazel run //explorer -- <program_location> --trace_file=... -trace_phase=source_program,execution ```
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
// RUN: %{explorer} --parser_debug --trace_file=- -trace_phase=declarations | %{FileCheck-allow-unmatched} --check-prefixes=NO-SOURCE,NO-NAMES,NO-PRELUDE,NO-FLOW,NO-TYPE,NO-UNFORMED,DECLS,NO-EXEC,NO-TIMING
|
||||
// RUN: %{explorer} --parser_debug --trace_file=- -trace_phase=timing | %{FileCheck-allow-unmatched} --check-prefixes=NO-SOURCE,NO-NAMES,NO-PRELUDE,NO-FLOW,NO-TYPE,NO-UNFORMED,NO-DECLS,NO-EXEC,TIMING
|
||||
// RUN: %{explorer} --parser_debug --trace_file=- -trace_phase=all | %{FileCheck-allow-unmatched} --check-prefixes=SOURCE,NAMES,NO-PRELUDE,FLOW,TYPE,UNFORMED,DECLS,EXEC,TIMING
|
||||
// RUN: %{explorer} --parser_debug --trace_file=- -trace_phase=source_program,declarations | %{FileCheck-allow-unmatched} --check-prefixes=SOURCE,NO-NAMES,NO-PRELUDE,NO-FLOW,NO-TYPE,NO-UNFORMED,DECLS,NO-EXEC,NO-TIMING
|
||||
// NO-SOURCE-NOT:STDOUT: ********** source program **********
|
||||
// SOURCE:STDOUT: ********** source program **********
|
||||
// NO-SOURCE-NOT:STDOUT: interface TestInterface {
|
||||
|
||||
+2
-1
@@ -78,7 +78,8 @@ auto ExplorerMain(int argc, char** argv, void* static_for_main_addr,
|
||||
ProgramPhase::Timing, "timing",
|
||||
"Include timing logs for each phase, indicating the time taken."),
|
||||
clEnumValN(ProgramPhase::All, "all",
|
||||
"Include trace output for all phases.")));
|
||||
"Include trace output for all phases.")),
|
||||
cl::CommaSeparated);
|
||||
|
||||
// Use the executable path as a base for the relative prelude path.
|
||||
std::string exe =
|
||||
|
||||
Reference in New Issue
Block a user