Use declaration locations for formatting entities (#5799)

This is just trying to address the location TODO.
This commit is contained in:
Jon Ross-Perkins
2025-07-14 23:27:03 +00:00
committed by GitHub
parent 16ab0b313a
commit be487bbeda
134 changed files with 2846 additions and 2851 deletions
@@ -71,15 +71,15 @@ fn E() {}
// CHECK:STDOUT: %pattern_type: type = pattern_type %empty_tuple.type [concrete]
// CHECK:STDOUT: %B.type: type = fn_type @B [concrete]
// CHECK:STDOUT: %B: %B.type = struct_value () [concrete]
// CHECK:STDOUT: %C.type.de0bfe.1: type = fn_type @C.1 [concrete]
// CHECK:STDOUT: %C.type.de0bfe.1: type = fn_type @C.loc35 [concrete]
// CHECK:STDOUT: %C.1b0370.1: %C.type.de0bfe.1 = struct_value () [concrete]
// CHECK:STDOUT: %C.type.de0bfe.2: type = fn_type @C.2 [concrete]
// CHECK:STDOUT: %C.type.de0bfe.2: type = fn_type @C.loc43 [concrete]
// CHECK:STDOUT: %C.1b0370.2: %C.type.de0bfe.2 = struct_value () [concrete]
// CHECK:STDOUT: %D.type: type = fn_type @D [concrete]
// CHECK:STDOUT: %D: %D.type = struct_value () [concrete]
// CHECK:STDOUT: %E.type.851869.1: type = fn_type @E.1 [concrete]
// CHECK:STDOUT: %E.type.851869.1: type = fn_type @E.loc55 [concrete]
// CHECK:STDOUT: %E.237d29.1: %E.type.851869.1 = struct_value () [concrete]
// CHECK:STDOUT: %E.type.851869.2: type = fn_type @E.2 [concrete]
// CHECK:STDOUT: %E.type.851869.2: type = fn_type @E.loc63 [concrete]
// CHECK:STDOUT: %E.237d29.2: %E.type.851869.2 = struct_value () [concrete]
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -115,8 +115,8 @@ fn E() {}
// CHECK:STDOUT: }
// CHECK:STDOUT: %x.loc33: %empty_tuple.type = bind_name x, %x.param.loc33
// CHECK:STDOUT: }
// CHECK:STDOUT: %C.decl.loc35: %C.type.de0bfe.1 = fn_decl @C.1 [concrete = constants.%C.1b0370.1] {} {}
// CHECK:STDOUT: %C.decl.loc43: %C.type.de0bfe.2 = fn_decl @C.2 [concrete = constants.%C.1b0370.2] {
// CHECK:STDOUT: %C.decl.loc35: %C.type.de0bfe.1 = fn_decl @C.loc35 [concrete = constants.%C.1b0370.1] {} {}
// CHECK:STDOUT: %C.decl.loc43: %C.type.de0bfe.2 = fn_decl @C.loc43 [concrete = constants.%C.1b0370.2] {
// CHECK:STDOUT: %x.patt: %pattern_type = binding_pattern x [concrete]
// CHECK:STDOUT: %x.param_patt: %pattern_type = value_param_pattern %x.patt, call_param0 [concrete]
// CHECK:STDOUT: } {
@@ -129,29 +129,29 @@ fn E() {}
// CHECK:STDOUT: }
// CHECK:STDOUT: %D.decl.loc45: %D.type = fn_decl @D [concrete = constants.%D] {} {}
// CHECK:STDOUT: %D.decl.loc53: %D.type = fn_decl @D [concrete = constants.%D] {} {}
// CHECK:STDOUT: %E.decl.loc55: %E.type.851869.1 = fn_decl @E.1 [concrete = constants.%E.237d29.1] {} {}
// CHECK:STDOUT: %E.decl.loc63: %E.type.851869.2 = fn_decl @E.2 [concrete = constants.%E.237d29.2] {} {}
// CHECK:STDOUT: %E.decl.loc55: %E.type.851869.1 = fn_decl @E.loc55 [concrete = constants.%E.237d29.1] {} {}
// CHECK:STDOUT: %E.decl.loc63: %E.type.851869.2 = fn_decl @E.loc63 [concrete = constants.%E.237d29.2] {} {}
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @A();
// CHECK:STDOUT:
// CHECK:STDOUT: fn @B(%x.param.loc25: %empty_tuple.type);
// CHECK:STDOUT:
// CHECK:STDOUT: fn @C.1();
// CHECK:STDOUT: fn @C.loc35();
// CHECK:STDOUT:
// CHECK:STDOUT: fn @C.2(%x.param: %empty_tuple.type);
// CHECK:STDOUT: fn @C.loc43(%x.param: %empty_tuple.type);
// CHECK:STDOUT:
// CHECK:STDOUT: fn @D() {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: return
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @E.1() {
// CHECK:STDOUT: fn @E.loc55() {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: return
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @E.2() {
// CHECK:STDOUT: fn @E.loc63() {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: return
// CHECK:STDOUT: }