mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 22:02:55 +01:00
Add separators between files in LLVM IR dumps (#7463)
Each file dump now starts with a `; ---` comment and ends with a blank line. This makes it easier to visually scan the dump for a file of interest. The comment format is somewhat arbitrary; I chose `---` to align with the `--- filename.carbon` separator in SemIR dumps, but without the filename, because that appears on each of the next two lines already.
This commit is contained in:
@@ -17,6 +17,7 @@ fn F() {
|
||||
G(&s.b);
|
||||
}
|
||||
|
||||
// CHECK:STDOUT: ; ---
|
||||
// CHECK:STDOUT: ; ModuleID = 'address_of_field.carbon'
|
||||
// CHECK:STDOUT: source_filename = "address_of_field.carbon"
|
||||
// CHECK:STDOUT:
|
||||
@@ -88,3 +89,4 @@ fn F() {
|
||||
// CHECK:STDOUT: !23 = !{!24}
|
||||
// CHECK:STDOUT: !24 = !DILocalVariable(arg: 1, scope: !19, type: !22)
|
||||
// CHECK:STDOUT: !25 = !DILocation(line: 16, column: 3, scope: !19)
|
||||
// CHECK:STDOUT:
|
||||
|
||||
@@ -15,6 +15,7 @@ fn F() {
|
||||
&n;
|
||||
}
|
||||
|
||||
// CHECK:STDOUT: ; ---
|
||||
// CHECK:STDOUT: ; ModuleID = 'address_of_unused.carbon'
|
||||
// CHECK:STDOUT: source_filename = "address_of_unused.carbon"
|
||||
// CHECK:STDOUT:
|
||||
@@ -59,3 +60,4 @@ fn F() {
|
||||
// CHECK:STDOUT: !13 = !{!14}
|
||||
// CHECK:STDOUT: !14 = !DILocalVariable(arg: 1, scope: !9, type: !12)
|
||||
// CHECK:STDOUT: !15 = !DILocation(line: 14, column: 3, scope: !9)
|
||||
// CHECK:STDOUT:
|
||||
|
||||
@@ -19,6 +19,7 @@ fn F() -> i32 {
|
||||
return G(&n);
|
||||
}
|
||||
|
||||
// CHECK:STDOUT: ; ---
|
||||
// CHECK:STDOUT: ; ModuleID = 'basic.carbon'
|
||||
// CHECK:STDOUT: source_filename = "basic.carbon"
|
||||
// CHECK:STDOUT:
|
||||
@@ -80,3 +81,4 @@ fn F() -> i32 {
|
||||
// CHECK:STDOUT: !22 = !{!23}
|
||||
// CHECK:STDOUT: !23 = !DILocalVariable(arg: 1, scope: !19, type: !7)
|
||||
// CHECK:STDOUT: !24 = !DILocation(line: 18, column: 3, scope: !19)
|
||||
// CHECK:STDOUT:
|
||||
|
||||
@@ -14,6 +14,7 @@ fn UnsafeAs(p: i32*) -> i64* {
|
||||
return p unsafe as i64*;
|
||||
}
|
||||
|
||||
// CHECK:STDOUT: ; ---
|
||||
// CHECK:STDOUT: ; ModuleID = 'convert.carbon'
|
||||
// CHECK:STDOUT: source_filename = "convert.carbon"
|
||||
// CHECK:STDOUT:
|
||||
@@ -39,3 +40,4 @@ fn UnsafeAs(p: i32*) -> i64* {
|
||||
// CHECK:STDOUT: !8 = !{!9}
|
||||
// CHECK:STDOUT: !9 = !DILocalVariable(arg: 1, scope: !4, type: !7)
|
||||
// CHECK:STDOUT: !10 = !DILocation(line: 14, column: 3, scope: !4)
|
||||
// CHECK:STDOUT:
|
||||
|
||||
@@ -17,6 +17,7 @@ fn F(p: i32**) -> i32 {
|
||||
return **c;
|
||||
}
|
||||
|
||||
// CHECK:STDOUT: ; ---
|
||||
// CHECK:STDOUT: ; ModuleID = 'pointer_to_pointer.carbon'
|
||||
// CHECK:STDOUT: source_filename = "pointer_to_pointer.carbon"
|
||||
// CHECK:STDOUT:
|
||||
@@ -70,3 +71,4 @@ fn F(p: i32**) -> i32 {
|
||||
// CHECK:STDOUT: !16 = !DILocation(line: 17, column: 11, scope: !4)
|
||||
// CHECK:STDOUT: !17 = !DILocation(line: 17, column: 10, scope: !4)
|
||||
// CHECK:STDOUT: !18 = !DILocation(line: 17, column: 3, scope: !4)
|
||||
// CHECK:STDOUT:
|
||||
|
||||
Reference in New Issue
Block a user