mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-06 07:24:42 +01:00
Explorer: Add heading and sub-heading methods to trace (#3088)
Instead of manually putting symbols before and after heading, this introduces two methods `Heading` and `SubHeading` inside `TraceStream`. Both methods take `llvm::StringRef` as parameter, formats the given text as follows and adds it into the output stream. **Heading** ``` * * * * * * * * * * heading * * * * * * * * * * ------------------------------------------------- ``` **Sub heading** ``` - - - - - sub heading - - - - - --------------------------------- ``` Note: both methods assert that tracing should be enabled.
This commit is contained in:
+2
-1
@@ -15,7 +15,8 @@ fn Main() -> i32 {
|
||||
// ARGS: --trace_file=- --trace_phase=source_program %s
|
||||
// AUTOUPDATE
|
||||
|
||||
// CHECK:STDOUT: ********** source program **********
|
||||
// CHECK:STDOUT: * * * * * * * * * * source program * * * * * * * * * *
|
||||
// CHECK:STDOUT: --------------------------------------------------------
|
||||
// CHECK:STDOUT: interface TestInterface {
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: fn Main ()-> i32 {
|
||||
|
||||
Reference in New Issue
Block a user