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:
@@ -72,6 +72,7 @@ fn InitLet() {
|
||||
G();
|
||||
}
|
||||
|
||||
// CHECK:STDOUT: ; ---
|
||||
// CHECK:STDOUT: ; ModuleID = 'let_param.carbon'
|
||||
// CHECK:STDOUT: source_filename = "let_param.carbon"
|
||||
// CHECK:STDOUT:
|
||||
@@ -134,6 +135,8 @@ fn InitLet() {
|
||||
// CHECK:STDOUT: !19 = !{!20}
|
||||
// CHECK:STDOUT: !20 = !DILocalVariable(arg: 1, scope: !18, type: !7)
|
||||
// CHECK:STDOUT: !21 = !DILocation(line: 12, column: 5, scope: !18)
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: ; ---
|
||||
// CHECK:STDOUT: ; ModuleID = 'var_param.carbon'
|
||||
// CHECK:STDOUT: source_filename = "var_param.carbon"
|
||||
// CHECK:STDOUT:
|
||||
@@ -199,6 +202,8 @@ fn InitLet() {
|
||||
// CHECK:STDOUT: !19 = !{!20}
|
||||
// CHECK:STDOUT: !20 = !DILocalVariable(arg: 1, scope: !18, type: !7)
|
||||
// CHECK:STDOUT: !21 = !DILocation(line: 6, column: 6, scope: !18)
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: ; ---
|
||||
// CHECK:STDOUT: ; ModuleID = 'return_slot.carbon'
|
||||
// CHECK:STDOUT: source_filename = "return_slot.carbon"
|
||||
// CHECK:STDOUT:
|
||||
@@ -292,3 +297,4 @@ fn InitLet() {
|
||||
// CHECK:STDOUT: !26 = !DILocation(line: 22, column: 14, scope: !25)
|
||||
// CHECK:STDOUT: !27 = !DILocation(line: 23, column: 3, scope: !25)
|
||||
// CHECK:STDOUT: !28 = !DILocation(line: 21, column: 1, scope: !25)
|
||||
// CHECK:STDOUT:
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
fn Echo(_: {}) {
|
||||
}
|
||||
|
||||
// CHECK:STDOUT: ; ---
|
||||
// CHECK:STDOUT: ; ModuleID = 'empty_struct.carbon'
|
||||
// CHECK:STDOUT: source_filename = "empty_struct.carbon"
|
||||
// CHECK:STDOUT:
|
||||
@@ -35,3 +36,4 @@ fn Echo(_: {}) {
|
||||
// CHECK:STDOUT: !5 = !DISubroutineType(types: !6)
|
||||
// CHECK:STDOUT: !6 = !{null}
|
||||
// CHECK:STDOUT: !7 = !DILocation(line: 13, column: 1, scope: !4)
|
||||
// CHECK:STDOUT:
|
||||
|
||||
@@ -43,6 +43,7 @@ fn F() -> i32 {
|
||||
return MustEval(1);
|
||||
}
|
||||
|
||||
// CHECK:STDOUT: ; ---
|
||||
// CHECK:STDOUT: ; ModuleID = 'eval.carbon'
|
||||
// CHECK:STDOUT: source_filename = "eval.carbon"
|
||||
// CHECK:STDOUT:
|
||||
@@ -90,6 +91,8 @@ fn F() -> i32 {
|
||||
// CHECK:STDOUT: !17 = !DILocalVariable(arg: 1, scope: !15, type: !7)
|
||||
// CHECK:STDOUT: !18 = !DILocation(line: 16, column: 10, scope: !15)
|
||||
// CHECK:STDOUT: !19 = !DILocation(line: 16, column: 3, scope: !15)
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: ; ---
|
||||
// CHECK:STDOUT: ; ModuleID = 'musteval.carbon'
|
||||
// CHECK:STDOUT: source_filename = "musteval.carbon"
|
||||
// CHECK:STDOUT:
|
||||
@@ -113,3 +116,4 @@ fn F() -> i32 {
|
||||
// CHECK:STDOUT: !6 = !{!7}
|
||||
// CHECK:STDOUT: !7 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
|
||||
// CHECK:STDOUT: !8 = !DILocation(line: 11, column: 3, scope: !4)
|
||||
// CHECK:STDOUT:
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
|
||||
fn Foo(_: i32) {}
|
||||
|
||||
// CHECK:STDOUT: ; ---
|
||||
// CHECK:STDOUT: ; ModuleID = 'params_one.carbon'
|
||||
// CHECK:STDOUT: source_filename = "params_one.carbon"
|
||||
// CHECK:STDOUT:
|
||||
@@ -37,3 +38,4 @@ fn Foo(_: i32) {}
|
||||
// CHECK:STDOUT: !8 = !{!9}
|
||||
// CHECK:STDOUT: !9 = !DILocalVariable(arg: 1, scope: !4, type: !7)
|
||||
// CHECK:STDOUT: !10 = !DILocation(line: 13, column: 1, scope: !4)
|
||||
// CHECK:STDOUT:
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
|
||||
fn Foo(_: i32, _: i32) {}
|
||||
|
||||
// CHECK:STDOUT: ; ---
|
||||
// CHECK:STDOUT: ; ModuleID = 'params_two.carbon'
|
||||
// CHECK:STDOUT: source_filename = "params_two.carbon"
|
||||
// CHECK:STDOUT:
|
||||
@@ -38,3 +39,4 @@ fn Foo(_: i32, _: i32) {}
|
||||
// CHECK:STDOUT: !9 = !DILocalVariable(arg: 1, scope: !4, type: !7)
|
||||
// CHECK:STDOUT: !10 = !DILocalVariable(arg: 2, scope: !4, type: !7)
|
||||
// CHECK:STDOUT: !11 = !DILocation(line: 13, column: 1, scope: !4)
|
||||
// CHECK:STDOUT:
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
|
||||
fn Foo() {}
|
||||
|
||||
// CHECK:STDOUT: ; ---
|
||||
// CHECK:STDOUT: ; ModuleID = 'params_zero.carbon'
|
||||
// CHECK:STDOUT: source_filename = "params_zero.carbon"
|
||||
// CHECK:STDOUT:
|
||||
@@ -34,3 +35,4 @@ fn Foo() {}
|
||||
// CHECK:STDOUT: !5 = !DISubroutineType(types: !6)
|
||||
// CHECK:STDOUT: !6 = !{null}
|
||||
// CHECK:STDOUT: !7 = !DILocation(line: 13, column: 1, scope: !4)
|
||||
// CHECK:STDOUT:
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
fn r#self() {}
|
||||
|
||||
|
||||
// CHECK:STDOUT: ; ---
|
||||
// CHECK:STDOUT: ; ModuleID = 'raw_name.carbon'
|
||||
// CHECK:STDOUT: source_filename = "raw_name.carbon"
|
||||
// CHECK:STDOUT:
|
||||
@@ -35,3 +36,4 @@ fn r#self() {}
|
||||
// CHECK:STDOUT: !5 = !DISubroutineType(types: !6)
|
||||
// CHECK:STDOUT: !6 = !{null}
|
||||
// CHECK:STDOUT: !7 = !DILocation(line: 13, column: 1, scope: !4)
|
||||
// CHECK:STDOUT:
|
||||
|
||||
@@ -28,6 +28,7 @@ fn Call() {
|
||||
LetThenVar(1, {});
|
||||
}
|
||||
|
||||
// CHECK:STDOUT: ; ---
|
||||
// CHECK:STDOUT: ; ModuleID = 'var_param.carbon'
|
||||
// CHECK:STDOUT: source_filename = "var_param.carbon"
|
||||
// CHECK:STDOUT:
|
||||
@@ -191,3 +192,4 @@ fn Call() {
|
||||
// CHECK:STDOUT: !56 = !{!57}
|
||||
// CHECK:STDOUT: !57 = !DILocalVariable(arg: 1, scope: !55, type: !7)
|
||||
// CHECK:STDOUT: !58 = !DILocation(line: 20, column: 15, scope: !55)
|
||||
// CHECK:STDOUT:
|
||||
|
||||
Reference in New Issue
Block a user