mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 21:51:12 +01:00
Format types in SemIR using the formatting for their instruction. (#4035)
Don't use the pretty-printed type name, because that's intended for diagnostics, not for a theoretically machine-readable format like SemIR. Types are always constants, so omit the leading `constant.` on the type instruction name.
This commit is contained in:
@@ -18,9 +18,9 @@ fn F(n: i32, a: [i32; n]*);
|
||||
// CHECK:STDOUT: constants {
|
||||
// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template]
|
||||
// CHECK:STDOUT: %.1: type = tuple_type () [template]
|
||||
// CHECK:STDOUT: %Int32: <type of Int32> = struct_value () [template]
|
||||
// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %F.type: type = fn_type @F [template]
|
||||
// CHECK:STDOUT: %F: <type of F> = struct_value () [template]
|
||||
// CHECK:STDOUT: %F: %F.type = struct_value () [template]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: file {
|
||||
@@ -29,9 +29,9 @@ fn F(n: i32, a: [i32; n]*);
|
||||
// CHECK:STDOUT: .F = %F.decl
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Core: <namespace> = namespace [template] {}
|
||||
// CHECK:STDOUT: %import_ref.1: <type of Int32> = import_ref ir3, inst+3, loaded [template = constants.%Int32]
|
||||
// CHECK:STDOUT: %import_ref.2: <type of Int32> = import_ref ir3, inst+3, loaded [template = constants.%Int32]
|
||||
// CHECK:STDOUT: %F.decl: <type of F> = fn_decl @F [template = constants.%F] {
|
||||
// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32]
|
||||
// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32]
|
||||
// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {
|
||||
// CHECK:STDOUT: %int.make_type_32.loc14_9: init type = call constants.%Int32() [template = i32]
|
||||
// CHECK:STDOUT: %.loc14_9.1: type = value_of_initializer %int.make_type_32.loc14_9 [template = i32]
|
||||
// CHECK:STDOUT: %.loc14_9.2: type = converted %int.make_type_32.loc14_9, %.loc14_9.1 [template = i32]
|
||||
|
||||
@@ -21,9 +21,9 @@ fn F(n: i32, n: i32);
|
||||
// CHECK:STDOUT: constants {
|
||||
// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template]
|
||||
// CHECK:STDOUT: %.1: type = tuple_type () [template]
|
||||
// CHECK:STDOUT: %Int32: <type of Int32> = struct_value () [template]
|
||||
// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %F.type: type = fn_type @F [template]
|
||||
// CHECK:STDOUT: %F: <type of F> = struct_value () [template]
|
||||
// CHECK:STDOUT: %F: %F.type = struct_value () [template]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: file {
|
||||
@@ -32,9 +32,9 @@ fn F(n: i32, n: i32);
|
||||
// CHECK:STDOUT: .F = %F.decl
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Core: <namespace> = namespace [template] {}
|
||||
// CHECK:STDOUT: %import_ref.1: <type of Int32> = import_ref ir3, inst+3, loaded [template = constants.%Int32]
|
||||
// CHECK:STDOUT: %import_ref.2: <type of Int32> = import_ref ir3, inst+3, loaded [template = constants.%Int32]
|
||||
// CHECK:STDOUT: %F.decl: <type of F> = fn_decl @F [template = constants.%F] {
|
||||
// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32]
|
||||
// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32]
|
||||
// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {
|
||||
// CHECK:STDOUT: %int.make_type_32.loc17_9: init type = call constants.%Int32() [template = i32]
|
||||
// CHECK:STDOUT: %.loc17_9.1: type = value_of_initializer %int.make_type_32.loc17_9 [template = i32]
|
||||
// CHECK:STDOUT: %.loc17_9.2: type = converted %int.make_type_32.loc17_9, %.loc17_9.1 [template = i32]
|
||||
|
||||
+283
-283
File diff suppressed because it is too large
Load Diff
+12
-12
@@ -43,14 +43,14 @@ var f: () = F();
|
||||
// CHECK:STDOUT: constants {
|
||||
// CHECK:STDOUT: %F.type: type = fn_type @F [template]
|
||||
// CHECK:STDOUT: %.1: type = tuple_type () [template]
|
||||
// CHECK:STDOUT: %F: <type of F> = struct_value () [template]
|
||||
// CHECK:STDOUT: %F: %F.type = struct_value () [template]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: file {
|
||||
// CHECK:STDOUT: package: <namespace> = namespace [template] {
|
||||
// CHECK:STDOUT: .F = %F.decl
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %F.decl: <type of F> = fn_decl @F [template = constants.%F] {}
|
||||
// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {}
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @F();
|
||||
@@ -60,15 +60,15 @@ var f: () = F();
|
||||
// CHECK:STDOUT: constants {
|
||||
// CHECK:STDOUT: %F.type: type = fn_type @F [template]
|
||||
// CHECK:STDOUT: %.1: type = tuple_type () [template]
|
||||
// CHECK:STDOUT: %F: <type of F> = struct_value () [template]
|
||||
// CHECK:STDOUT: %F: %F.type = struct_value () [template]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: file {
|
||||
// CHECK:STDOUT: package: <namespace> = namespace [template] {
|
||||
// CHECK:STDOUT: .F = %F
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %import_ref: <type of F> = import_ref ir1, inst+1, loaded [template = constants.%F]
|
||||
// CHECK:STDOUT: %F: <type of F> = export F, %import_ref [template = constants.%F]
|
||||
// CHECK:STDOUT: %import_ref: %F.type = import_ref ir1, inst+1, loaded [template = constants.%F]
|
||||
// CHECK:STDOUT: %F: %F.type = export F, %import_ref [template = constants.%F]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @F();
|
||||
@@ -78,7 +78,7 @@ var f: () = F();
|
||||
// CHECK:STDOUT: constants {
|
||||
// CHECK:STDOUT: %.1: type = tuple_type () [template]
|
||||
// CHECK:STDOUT: %F.type: type = fn_type @F [template]
|
||||
// CHECK:STDOUT: %F: <type of F> = struct_value () [template]
|
||||
// CHECK:STDOUT: %F: %F.type = struct_value () [template]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: file {
|
||||
@@ -86,19 +86,19 @@ var f: () = F();
|
||||
// CHECK:STDOUT: .F = %import_ref
|
||||
// CHECK:STDOUT: .f = %f
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %import_ref: <type of F> = import_ref ir1, inst+6, loaded [template = constants.%F]
|
||||
// CHECK:STDOUT: %.loc6_9.1: () = tuple_literal ()
|
||||
// CHECK:STDOUT: %import_ref: %F.type = import_ref ir1, inst+6, loaded [template = constants.%F]
|
||||
// CHECK:STDOUT: %.loc6_9.1: %.1 = tuple_literal ()
|
||||
// CHECK:STDOUT: %.loc6_9.2: type = converted %.loc6_9.1, constants.%.1 [template = constants.%.1]
|
||||
// CHECK:STDOUT: %f.var: ref () = var f
|
||||
// CHECK:STDOUT: %f: ref () = bind_name f, %f.var
|
||||
// CHECK:STDOUT: %f.var: ref %.1 = var f
|
||||
// CHECK:STDOUT: %f: ref %.1 = bind_name f, %f.var
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @F();
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @__global_init() {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %F.ref: <type of F> = name_ref F, file.%import_ref [template = constants.%F]
|
||||
// CHECK:STDOUT: %F.call: init () = call %F.ref()
|
||||
// CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%import_ref [template = constants.%F]
|
||||
// CHECK:STDOUT: %F.call: init %.1 = call %F.ref()
|
||||
// CHECK:STDOUT: assign file.%f.var, %F.call
|
||||
// CHECK:STDOUT: return
|
||||
// CHECK:STDOUT: }
|
||||
|
||||
@@ -61,14 +61,14 @@ class C {
|
||||
// CHECK:STDOUT: constants {
|
||||
// CHECK:STDOUT: %F.type: type = fn_type @F [template]
|
||||
// CHECK:STDOUT: %.1: type = tuple_type () [template]
|
||||
// CHECK:STDOUT: %F: <type of F> = struct_value () [template]
|
||||
// CHECK:STDOUT: %F: %F.type = struct_value () [template]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: file {
|
||||
// CHECK:STDOUT: package: <namespace> = namespace [template] {
|
||||
// CHECK:STDOUT: .F = %F.decl
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %F.decl: <type of F> = fn_decl @F [template = constants.%F] {}
|
||||
// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {}
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: extern fn @F();
|
||||
@@ -78,15 +78,15 @@ class C {
|
||||
// CHECK:STDOUT: constants {
|
||||
// CHECK:STDOUT: %F.type: type = fn_type @F [template]
|
||||
// CHECK:STDOUT: %.1: type = tuple_type () [template]
|
||||
// CHECK:STDOUT: %F: <type of F> = struct_value () [template]
|
||||
// CHECK:STDOUT: %F: %F.type = struct_value () [template]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: file {
|
||||
// CHECK:STDOUT: package: <namespace> = namespace [template] {
|
||||
// CHECK:STDOUT: .F = %F.decl.loc4
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %F.decl.loc4: <type of F> = fn_decl @F [template = constants.%F] {}
|
||||
// CHECK:STDOUT: %F.decl.loc12: <type of F> = fn_decl @F [template = constants.%F] {}
|
||||
// CHECK:STDOUT: %F.decl.loc4: %F.type = fn_decl @F [template = constants.%F] {}
|
||||
// CHECK:STDOUT: %F.decl.loc12: %F.type = fn_decl @F [template = constants.%F] {}
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: extern fn @F();
|
||||
@@ -96,15 +96,15 @@ class C {
|
||||
// CHECK:STDOUT: constants {
|
||||
// CHECK:STDOUT: %F.type: type = fn_type @F [template]
|
||||
// CHECK:STDOUT: %.1: type = tuple_type () [template]
|
||||
// CHECK:STDOUT: %F: <type of F> = struct_value () [template]
|
||||
// CHECK:STDOUT: %F: %F.type = struct_value () [template]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: file {
|
||||
// CHECK:STDOUT: package: <namespace> = namespace [template] {
|
||||
// CHECK:STDOUT: .F = %F.decl.loc12
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %F.decl.loc4: <type of F> = fn_decl @F [template = constants.%F] {}
|
||||
// CHECK:STDOUT: %F.decl.loc12: <type of F> = fn_decl @F [template = constants.%F] {}
|
||||
// CHECK:STDOUT: %F.decl.loc4: %F.type = fn_decl @F [template = constants.%F] {}
|
||||
// CHECK:STDOUT: %F.decl.loc12: %F.type = fn_decl @F [template = constants.%F] {}
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @F();
|
||||
@@ -115,9 +115,9 @@ class C {
|
||||
// CHECK:STDOUT: %C: type = class_type @C [template]
|
||||
// CHECK:STDOUT: %F.type: type = fn_type @F [template]
|
||||
// CHECK:STDOUT: %.1: type = tuple_type () [template]
|
||||
// CHECK:STDOUT: %F: <type of F> = struct_value () [template]
|
||||
// CHECK:STDOUT: %F: %F.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %G.type: type = fn_type @G [template]
|
||||
// CHECK:STDOUT: %G: <type of G> = struct_value () [template]
|
||||
// CHECK:STDOUT: %G: %G.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %.2: type = struct_type {} [template]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -129,11 +129,11 @@ class C {
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: class @C {
|
||||
// CHECK:STDOUT: %F.decl: <type of F> = fn_decl @F [template = constants.%F] {}
|
||||
// CHECK:STDOUT: %G.decl: <type of G> = fn_decl @G [template = constants.%G] {
|
||||
// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {}
|
||||
// CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] {
|
||||
// CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%C [template = constants.%C]
|
||||
// CHECK:STDOUT: %self.loc11_15.1: C = param self
|
||||
// CHECK:STDOUT: %self.loc11_15.2: C = bind_name self, %self.loc11_15.1
|
||||
// CHECK:STDOUT: %self.loc11_15.1: %C = param self
|
||||
// CHECK:STDOUT: %self.loc11_15.2: %C = bind_name self, %self.loc11_15.1
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !members:
|
||||
@@ -144,5 +144,5 @@ class C {
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @F();
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @G[@C.%self.loc11_15.2: C]();
|
||||
// CHECK:STDOUT: fn @G[@C.%self.loc11_15.2: %C]();
|
||||
// CHECK:STDOUT:
|
||||
|
||||
Vendored
+42
-42
@@ -82,15 +82,15 @@ fn CallFAndGIncomplete() {
|
||||
// CHECK:STDOUT: %D: type = class_type @D [template]
|
||||
// CHECK:STDOUT: %ReturnCUnused.type: type = fn_type @ReturnCUnused [template]
|
||||
// CHECK:STDOUT: %.1: type = tuple_type () [template]
|
||||
// CHECK:STDOUT: %ReturnCUnused: <type of ReturnCUnused> = struct_value () [template]
|
||||
// CHECK:STDOUT: %ReturnCUnused: %ReturnCUnused.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %ReturnCUsed.type: type = fn_type @ReturnCUsed [template]
|
||||
// CHECK:STDOUT: %ReturnCUsed: <type of ReturnCUsed> = struct_value () [template]
|
||||
// CHECK:STDOUT: %ReturnCUsed: %ReturnCUsed.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %ReturnDUnused.type: type = fn_type @ReturnDUnused [template]
|
||||
// CHECK:STDOUT: %ReturnDUnused: <type of ReturnDUnused> = struct_value () [template]
|
||||
// CHECK:STDOUT: %ReturnDUnused: %ReturnDUnused.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %ReturnDUsed.type: type = fn_type @ReturnDUsed [template]
|
||||
// CHECK:STDOUT: %ReturnDUsed: <type of ReturnDUsed> = struct_value () [template]
|
||||
// CHECK:STDOUT: %ReturnDUsed: %ReturnDUsed.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %Call.type: type = fn_type @Call [template]
|
||||
// CHECK:STDOUT: %Call: <type of Call> = struct_value () [template]
|
||||
// CHECK:STDOUT: %Call: %Call.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %.2: type = struct_type {} [template]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -106,23 +106,23 @@ fn CallFAndGIncomplete() {
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {}
|
||||
// CHECK:STDOUT: %D.decl.loc5: type = class_decl @D [template = constants.%D] {}
|
||||
// CHECK:STDOUT: %ReturnCUnused.decl: <type of ReturnCUnused> = fn_decl @ReturnCUnused [template = constants.%ReturnCUnused] {
|
||||
// CHECK:STDOUT: %ReturnCUnused.decl: %ReturnCUnused.type = fn_decl @ReturnCUnused [template = constants.%ReturnCUnused] {
|
||||
// CHECK:STDOUT: %C.ref.loc7: type = name_ref C, %C.decl [template = constants.%C]
|
||||
// CHECK:STDOUT: @ReturnCUnused.%return: ref C = var <return slot>
|
||||
// CHECK:STDOUT: @ReturnCUnused.%return: ref %C = var <return slot>
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %ReturnCUsed.decl: <type of ReturnCUsed> = fn_decl @ReturnCUsed [template = constants.%ReturnCUsed] {
|
||||
// CHECK:STDOUT: %ReturnCUsed.decl: %ReturnCUsed.type = fn_decl @ReturnCUsed [template = constants.%ReturnCUsed] {
|
||||
// CHECK:STDOUT: %C.ref.loc8: type = name_ref C, %C.decl [template = constants.%C]
|
||||
// CHECK:STDOUT: @ReturnCUsed.%return: ref C = var <return slot>
|
||||
// CHECK:STDOUT: @ReturnCUsed.%return: ref %C = var <return slot>
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %ReturnDUnused.decl: <type of ReturnDUnused> = fn_decl @ReturnDUnused [template = constants.%ReturnDUnused] {
|
||||
// CHECK:STDOUT: %ReturnDUnused.decl: %ReturnDUnused.type = fn_decl @ReturnDUnused [template = constants.%ReturnDUnused] {
|
||||
// CHECK:STDOUT: %D.ref.loc9: type = name_ref D, %D.decl.loc5 [template = constants.%D]
|
||||
// CHECK:STDOUT: @ReturnDUnused.%return: ref D = var <return slot>
|
||||
// CHECK:STDOUT: @ReturnDUnused.%return: ref %D = var <return slot>
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %ReturnDUsed.decl: <type of ReturnDUsed> = fn_decl @ReturnDUsed [template = constants.%ReturnDUsed] {
|
||||
// CHECK:STDOUT: %ReturnDUsed.decl: %ReturnDUsed.type = fn_decl @ReturnDUsed [template = constants.%ReturnDUsed] {
|
||||
// CHECK:STDOUT: %D.ref.loc10: type = name_ref D, %D.decl.loc5 [template = constants.%D]
|
||||
// CHECK:STDOUT: @ReturnDUsed.%return: ref D = var <return slot>
|
||||
// CHECK:STDOUT: @ReturnDUsed.%return: ref %D = var <return slot>
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Call.decl: <type of Call> = fn_decl @Call [template = constants.%Call] {}
|
||||
// CHECK:STDOUT: %Call.decl: %Call.type = fn_decl @Call [template = constants.%Call] {}
|
||||
// CHECK:STDOUT: %D.decl.loc37: type = class_decl @D [template = constants.%D] {}
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -133,19 +133,19 @@ fn CallFAndGIncomplete() {
|
||||
// CHECK:STDOUT: .Self = constants.%D
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @ReturnCUnused() -> C;
|
||||
// CHECK:STDOUT: fn @ReturnCUnused() -> %C;
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @ReturnCUsed() -> C;
|
||||
// CHECK:STDOUT: fn @ReturnCUsed() -> %C;
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @ReturnDUnused() -> D;
|
||||
// CHECK:STDOUT: fn @ReturnDUnused() -> %D;
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @ReturnDUsed() -> D;
|
||||
// CHECK:STDOUT: fn @ReturnDUsed() -> %D;
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @Call() {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %ReturnCUsed.ref: <type of ReturnCUsed> = name_ref ReturnCUsed, file.%ReturnCUsed.decl [template = constants.%ReturnCUsed]
|
||||
// CHECK:STDOUT: %ReturnCUsed.ref: %ReturnCUsed.type = name_ref ReturnCUsed, file.%ReturnCUsed.decl [template = constants.%ReturnCUsed]
|
||||
// CHECK:STDOUT: %ReturnCUsed.call: init <error> = call %ReturnCUsed.ref()
|
||||
// CHECK:STDOUT: %ReturnDUsed.ref: <type of ReturnDUsed> = name_ref ReturnDUsed, file.%ReturnDUsed.decl [template = constants.%ReturnDUsed]
|
||||
// CHECK:STDOUT: %ReturnDUsed.ref: %ReturnDUsed.type = name_ref ReturnDUsed, file.%ReturnDUsed.decl [template = constants.%ReturnDUsed]
|
||||
// CHECK:STDOUT: %ReturnDUsed.call: init <error> = call %ReturnDUsed.ref()
|
||||
// CHECK:STDOUT: return
|
||||
// CHECK:STDOUT: }
|
||||
@@ -155,19 +155,19 @@ fn CallFAndGIncomplete() {
|
||||
// CHECK:STDOUT: constants {
|
||||
// CHECK:STDOUT: %CallFAndGIncomplete.type: type = fn_type @CallFAndGIncomplete [template]
|
||||
// CHECK:STDOUT: %.1: type = tuple_type () [template]
|
||||
// CHECK:STDOUT: %CallFAndGIncomplete: <type of CallFAndGIncomplete> = struct_value () [template]
|
||||
// CHECK:STDOUT: %CallFAndGIncomplete: %CallFAndGIncomplete.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %C: type = class_type @C [template]
|
||||
// CHECK:STDOUT: %ReturnCUnused.type: type = fn_type @ReturnCUnused [template]
|
||||
// CHECK:STDOUT: %ReturnCUnused: <type of ReturnCUnused> = struct_value () [template]
|
||||
// CHECK:STDOUT: %ReturnCUnused: %ReturnCUnused.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %ReturnCUsed.type: type = fn_type @ReturnCUsed [template]
|
||||
// CHECK:STDOUT: %ReturnCUsed: <type of ReturnCUsed> = struct_value () [template]
|
||||
// CHECK:STDOUT: %ReturnCUsed: %ReturnCUsed.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %D: type = class_type @D [template]
|
||||
// CHECK:STDOUT: %.2: type = struct_type {} [template]
|
||||
// CHECK:STDOUT: %ReturnDUnused.type: type = fn_type @ReturnDUnused [template]
|
||||
// CHECK:STDOUT: %ReturnDUnused: <type of ReturnDUnused> = struct_value () [template]
|
||||
// CHECK:STDOUT: %.3: type = ptr_type {} [template]
|
||||
// CHECK:STDOUT: %ReturnDUnused: %ReturnDUnused.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %.3: type = ptr_type %.2 [template]
|
||||
// CHECK:STDOUT: %ReturnDUsed.type: type = fn_type @ReturnDUsed [template]
|
||||
// CHECK:STDOUT: %ReturnDUsed: <type of ReturnDUsed> = struct_value () [template]
|
||||
// CHECK:STDOUT: %ReturnDUsed: %ReturnDUsed.type = struct_value () [template]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: file {
|
||||
@@ -183,12 +183,12 @@ fn CallFAndGIncomplete() {
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %import_ref.1 = import_ref ir1, inst+1, unloaded
|
||||
// CHECK:STDOUT: %import_ref.2 = import_ref ir1, inst+3, unloaded
|
||||
// CHECK:STDOUT: %import_ref.3: <type of ReturnCUnused> = import_ref ir1, inst+7, loaded [template = constants.%ReturnCUnused]
|
||||
// CHECK:STDOUT: %import_ref.4: <type of ReturnCUsed> = import_ref ir1, inst+13, loaded [template = constants.%ReturnCUsed]
|
||||
// CHECK:STDOUT: %import_ref.5: <type of ReturnDUnused> = import_ref ir1, inst+18, loaded [template = constants.%ReturnDUnused]
|
||||
// CHECK:STDOUT: %import_ref.6: <type of ReturnDUsed> = import_ref ir1, inst+23, loaded [template = constants.%ReturnDUsed]
|
||||
// CHECK:STDOUT: %import_ref.3: %ReturnCUnused.type = import_ref ir1, inst+7, loaded [template = constants.%ReturnCUnused]
|
||||
// CHECK:STDOUT: %import_ref.4: %ReturnCUsed.type = import_ref ir1, inst+13, loaded [template = constants.%ReturnCUsed]
|
||||
// CHECK:STDOUT: %import_ref.5: %ReturnDUnused.type = import_ref ir1, inst+18, loaded [template = constants.%ReturnDUnused]
|
||||
// CHECK:STDOUT: %import_ref.6: %ReturnDUsed.type = import_ref ir1, inst+23, loaded [template = constants.%ReturnDUsed]
|
||||
// CHECK:STDOUT: %import_ref.7 = import_ref ir1, inst+26, unloaded
|
||||
// CHECK:STDOUT: %CallFAndGIncomplete.decl: <type of CallFAndGIncomplete> = fn_decl @CallFAndGIncomplete [template = constants.%CallFAndGIncomplete] {}
|
||||
// CHECK:STDOUT: %CallFAndGIncomplete.decl: %CallFAndGIncomplete.type = fn_decl @CallFAndGIncomplete [template = constants.%CallFAndGIncomplete] {}
|
||||
// CHECK:STDOUT: %import_ref.8 = import_ref ir1, inst+4, unloaded
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -201,24 +201,24 @@ fn CallFAndGIncomplete() {
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @CallFAndGIncomplete() {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %ReturnCUnused.ref: <type of ReturnCUnused> = name_ref ReturnCUnused, file.%import_ref.3 [template = constants.%ReturnCUnused]
|
||||
// CHECK:STDOUT: %ReturnCUnused.ref: %ReturnCUnused.type = name_ref ReturnCUnused, file.%import_ref.3 [template = constants.%ReturnCUnused]
|
||||
// CHECK:STDOUT: %ReturnCUnused.call: init <error> = call %ReturnCUnused.ref()
|
||||
// CHECK:STDOUT: %ReturnCUsed.ref: <type of ReturnCUsed> = name_ref ReturnCUsed, file.%import_ref.4 [template = constants.%ReturnCUsed]
|
||||
// CHECK:STDOUT: %ReturnCUsed.ref: %ReturnCUsed.type = name_ref ReturnCUsed, file.%import_ref.4 [template = constants.%ReturnCUsed]
|
||||
// CHECK:STDOUT: %ReturnCUsed.call: init <error> = call %ReturnCUsed.ref()
|
||||
// CHECK:STDOUT: %ReturnDUnused.ref: <type of ReturnDUnused> = name_ref ReturnDUnused, file.%import_ref.5 [template = constants.%ReturnDUnused]
|
||||
// CHECK:STDOUT: %.loc24_16.1: ref D = temporary_storage
|
||||
// CHECK:STDOUT: %ReturnDUnused.call: init D = call %ReturnDUnused.ref() to %.loc24_16.1
|
||||
// CHECK:STDOUT: %.loc24_16.2: ref D = temporary %.loc24_16.1, %ReturnDUnused.call
|
||||
// CHECK:STDOUT: %ReturnDUsed.ref: <type of ReturnDUsed> = name_ref ReturnDUsed, file.%import_ref.6 [template = constants.%ReturnDUsed]
|
||||
// CHECK:STDOUT: %ReturnDUnused.ref: %ReturnDUnused.type = name_ref ReturnDUnused, file.%import_ref.5 [template = constants.%ReturnDUnused]
|
||||
// CHECK:STDOUT: %.loc24_16.1: ref %D = temporary_storage
|
||||
// CHECK:STDOUT: %ReturnDUnused.call: init %D = call %ReturnDUnused.ref() to %.loc24_16.1
|
||||
// CHECK:STDOUT: %.loc24_16.2: ref %D = temporary %.loc24_16.1, %ReturnDUnused.call
|
||||
// CHECK:STDOUT: %ReturnDUsed.ref: %ReturnDUsed.type = name_ref ReturnDUsed, file.%import_ref.6 [template = constants.%ReturnDUsed]
|
||||
// CHECK:STDOUT: %ReturnDUsed.call: init <error> = call %ReturnDUsed.ref()
|
||||
// CHECK:STDOUT: return
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @ReturnCUnused() -> C;
|
||||
// CHECK:STDOUT: fn @ReturnCUnused() -> %C;
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @ReturnCUsed() -> C;
|
||||
// CHECK:STDOUT: fn @ReturnCUsed() -> %C;
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @ReturnDUnused() -> D;
|
||||
// CHECK:STDOUT: fn @ReturnDUnused() -> %D;
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @ReturnDUsed() -> D;
|
||||
// CHECK:STDOUT: fn @ReturnDUsed() -> %D;
|
||||
// CHECK:STDOUT:
|
||||
|
||||
+14
-14
@@ -99,19 +99,19 @@ extern private fn ExternOrderAndConflict() {}
|
||||
// CHECK:STDOUT: constants {
|
||||
// CHECK:STDOUT: %WrongOrder.type: type = fn_type @WrongOrder [template]
|
||||
// CHECK:STDOUT: %.1: type = tuple_type () [template]
|
||||
// CHECK:STDOUT: %WrongOrder: <type of WrongOrder> = struct_value () [template]
|
||||
// CHECK:STDOUT: %WrongOrder: %WrongOrder.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %DuplicateVirtual.type: type = fn_type @DuplicateVirtual [template]
|
||||
// CHECK:STDOUT: %DuplicateVirtual: <type of DuplicateVirtual> = struct_value () [template]
|
||||
// CHECK:STDOUT: %DuplicateVirtual: %DuplicateVirtual.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %TwoAccess.type: type = fn_type @TwoAccess [template]
|
||||
// CHECK:STDOUT: %TwoAccess: <type of TwoAccess> = struct_value () [template]
|
||||
// CHECK:STDOUT: %TwoAccess: %TwoAccess.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %ModifiersConflict.type: type = fn_type @ModifiersConflict [template]
|
||||
// CHECK:STDOUT: %ModifiersConflict: <type of ModifiersConflict> = struct_value () [template]
|
||||
// CHECK:STDOUT: %ModifiersConflict: %ModifiersConflict.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %InvalidModifier.type: type = fn_type @InvalidModifier [template]
|
||||
// CHECK:STDOUT: %InvalidModifier: <type of InvalidModifier> = struct_value () [template]
|
||||
// CHECK:STDOUT: %InvalidModifier: %InvalidModifier.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %ModifiersConflict2.type: type = fn_type @ModifiersConflict2 [template]
|
||||
// CHECK:STDOUT: %ModifiersConflict2: <type of ModifiersConflict2> = struct_value () [template]
|
||||
// CHECK:STDOUT: %ModifiersConflict2: %ModifiersConflict2.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %ExternOrderAndConflict.type: type = fn_type @ExternOrderAndConflict [template]
|
||||
// CHECK:STDOUT: %ExternOrderAndConflict: <type of ExternOrderAndConflict> = struct_value () [template]
|
||||
// CHECK:STDOUT: %ExternOrderAndConflict: %ExternOrderAndConflict.type = struct_value () [template]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: file {
|
||||
@@ -124,13 +124,13 @@ extern private fn ExternOrderAndConflict() {}
|
||||
// CHECK:STDOUT: .ModifiersConflict2 = %ModifiersConflict2.decl
|
||||
// CHECK:STDOUT: .ExternOrderAndConflict = %ExternOrderAndConflict.decl
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %WrongOrder.decl: <type of WrongOrder> = fn_decl @WrongOrder [template = constants.%WrongOrder] {}
|
||||
// CHECK:STDOUT: %DuplicateVirtual.decl: <type of DuplicateVirtual> = fn_decl @DuplicateVirtual [template = constants.%DuplicateVirtual] {}
|
||||
// CHECK:STDOUT: %TwoAccess.decl: <type of TwoAccess> = fn_decl @TwoAccess [template = constants.%TwoAccess] {}
|
||||
// CHECK:STDOUT: %ModifiersConflict.decl: <type of ModifiersConflict> = fn_decl @ModifiersConflict [template = constants.%ModifiersConflict] {}
|
||||
// CHECK:STDOUT: %InvalidModifier.decl: <type of InvalidModifier> = fn_decl @InvalidModifier [template = constants.%InvalidModifier] {}
|
||||
// CHECK:STDOUT: %ModifiersConflict2.decl: <type of ModifiersConflict2> = fn_decl @ModifiersConflict2 [template = constants.%ModifiersConflict2] {}
|
||||
// CHECK:STDOUT: %ExternOrderAndConflict.decl: <type of ExternOrderAndConflict> = fn_decl @ExternOrderAndConflict [template = constants.%ExternOrderAndConflict] {}
|
||||
// CHECK:STDOUT: %WrongOrder.decl: %WrongOrder.type = fn_decl @WrongOrder [template = constants.%WrongOrder] {}
|
||||
// CHECK:STDOUT: %DuplicateVirtual.decl: %DuplicateVirtual.type = fn_decl @DuplicateVirtual [template = constants.%DuplicateVirtual] {}
|
||||
// CHECK:STDOUT: %TwoAccess.decl: %TwoAccess.type = fn_decl @TwoAccess [template = constants.%TwoAccess] {}
|
||||
// CHECK:STDOUT: %ModifiersConflict.decl: %ModifiersConflict.type = fn_decl @ModifiersConflict [template = constants.%ModifiersConflict] {}
|
||||
// CHECK:STDOUT: %InvalidModifier.decl: %InvalidModifier.type = fn_decl @InvalidModifier [template = constants.%InvalidModifier] {}
|
||||
// CHECK:STDOUT: %ModifiersConflict2.decl: %ModifiersConflict2.type = fn_decl @ModifiersConflict2 [template = constants.%ModifiersConflict2] {}
|
||||
// CHECK:STDOUT: %ExternOrderAndConflict.decl: %ExternOrderAndConflict.type = fn_decl @ExternOrderAndConflict [template = constants.%ExternOrderAndConflict] {}
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @WrongOrder();
|
||||
|
||||
+27
-27
@@ -62,17 +62,17 @@ fn E() {}
|
||||
// CHECK:STDOUT: constants {
|
||||
// CHECK:STDOUT: %A.type: type = fn_type @A [template]
|
||||
// CHECK:STDOUT: %.1: type = tuple_type () [template]
|
||||
// CHECK:STDOUT: %A: <type of A> = struct_value () [template]
|
||||
// CHECK:STDOUT: %A: %A.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %B.type: type = fn_type @B [template]
|
||||
// CHECK:STDOUT: %B: <type of B> = struct_value () [template]
|
||||
// CHECK:STDOUT: %B: %B.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %C.type: type = fn_type @C [template]
|
||||
// CHECK:STDOUT: %C: <type of C> = struct_value () [template]
|
||||
// CHECK:STDOUT: %C: %C.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %.type: type = fn_type @.1 [template]
|
||||
// CHECK:STDOUT: %.2: <type of <invalid>> = struct_value () [template]
|
||||
// CHECK:STDOUT: %.2: %.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %D.type: type = fn_type @D [template]
|
||||
// CHECK:STDOUT: %D: <type of D> = struct_value () [template]
|
||||
// CHECK:STDOUT: %D: %D.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %E.type: type = fn_type @E [template]
|
||||
// CHECK:STDOUT: %E: <type of E> = struct_value () [template]
|
||||
// CHECK:STDOUT: %E: %E.type = struct_value () [template]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: file {
|
||||
@@ -83,40 +83,40 @@ fn E() {}
|
||||
// CHECK:STDOUT: .D = %D.decl.loc41
|
||||
// CHECK:STDOUT: .E = %E.decl.loc51
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %A.decl.loc11: <type of A> = fn_decl @A [template = constants.%A] {}
|
||||
// CHECK:STDOUT: %A.decl.loc19: <type of A> = fn_decl @A [template = constants.%A] {}
|
||||
// CHECK:STDOUT: %B.decl.loc21: <type of B> = fn_decl @B [template = constants.%B] {
|
||||
// CHECK:STDOUT: %.loc21_10.1: () = tuple_literal ()
|
||||
// CHECK:STDOUT: %A.decl.loc11: %A.type = fn_decl @A [template = constants.%A] {}
|
||||
// CHECK:STDOUT: %A.decl.loc19: %A.type = fn_decl @A [template = constants.%A] {}
|
||||
// CHECK:STDOUT: %B.decl.loc21: %B.type = fn_decl @B [template = constants.%B] {
|
||||
// CHECK:STDOUT: %.loc21_10.1: %.1 = tuple_literal ()
|
||||
// CHECK:STDOUT: %.loc21_10.2: type = converted %.loc21_10.1, constants.%.1 [template = constants.%.1]
|
||||
// CHECK:STDOUT: %x.loc21_6.1: () = param x
|
||||
// CHECK:STDOUT: @B.%x: () = bind_name x, %x.loc21_6.1
|
||||
// CHECK:STDOUT: %x.loc21_6.1: %.1 = param x
|
||||
// CHECK:STDOUT: @B.%x: %.1 = bind_name x, %x.loc21_6.1
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %B.decl.loc29: <type of B> = fn_decl @B [template = constants.%B] {
|
||||
// CHECK:STDOUT: %.loc29_10.1: () = tuple_literal ()
|
||||
// CHECK:STDOUT: %B.decl.loc29: %B.type = fn_decl @B [template = constants.%B] {
|
||||
// CHECK:STDOUT: %.loc29_10.1: %.1 = tuple_literal ()
|
||||
// CHECK:STDOUT: %.loc29_10.2: type = converted %.loc29_10.1, constants.%.1 [template = constants.%.1]
|
||||
// CHECK:STDOUT: %x.loc29_6.1: () = param x
|
||||
// CHECK:STDOUT: %x.loc29_6.2: () = bind_name x, %x.loc29_6.1
|
||||
// CHECK:STDOUT: %x.loc29_6.1: %.1 = param x
|
||||
// CHECK:STDOUT: %x.loc29_6.2: %.1 = bind_name x, %x.loc29_6.1
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %C.decl: <type of C> = fn_decl @C [template = constants.%C] {}
|
||||
// CHECK:STDOUT: %.decl: <type of <invalid>> = fn_decl @.1 [template = constants.%.2] {
|
||||
// CHECK:STDOUT: %.loc39_10.1: () = tuple_literal ()
|
||||
// CHECK:STDOUT: %C.decl: %C.type = fn_decl @C [template = constants.%C] {}
|
||||
// CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.2] {
|
||||
// CHECK:STDOUT: %.loc39_10.1: %.1 = tuple_literal ()
|
||||
// CHECK:STDOUT: %.loc39_10.2: type = converted %.loc39_10.1, constants.%.1 [template = constants.%.1]
|
||||
// CHECK:STDOUT: %x.loc39_6.1: () = param x
|
||||
// CHECK:STDOUT: @.1.%x: () = bind_name x, %x.loc39_6.1
|
||||
// CHECK:STDOUT: %x.loc39_6.1: %.1 = param x
|
||||
// CHECK:STDOUT: @.1.%x: %.1 = bind_name x, %x.loc39_6.1
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %D.decl.loc41: <type of D> = fn_decl @D [template = constants.%D] {}
|
||||
// CHECK:STDOUT: %D.decl.loc49: <type of D> = fn_decl @D [template = constants.%D] {}
|
||||
// CHECK:STDOUT: %E.decl.loc51: <type of E> = fn_decl @E [template = constants.%E] {}
|
||||
// CHECK:STDOUT: %E.decl.loc58: <type of E> = fn_decl @E [template = constants.%E] {}
|
||||
// CHECK:STDOUT: %D.decl.loc41: %D.type = fn_decl @D [template = constants.%D] {}
|
||||
// CHECK:STDOUT: %D.decl.loc49: %D.type = fn_decl @D [template = constants.%D] {}
|
||||
// CHECK:STDOUT: %E.decl.loc51: %E.type = fn_decl @E [template = constants.%E] {}
|
||||
// CHECK:STDOUT: %E.decl.loc58: %E.type = fn_decl @E [template = constants.%E] {}
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @A();
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @B(%x: ());
|
||||
// CHECK:STDOUT: fn @B(%x: %.1);
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @C();
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @.1(%x: ());
|
||||
// CHECK:STDOUT: fn @.1(%x: %.1);
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @D() {
|
||||
// CHECK:STDOUT: !entry:
|
||||
|
||||
+6
-6
@@ -45,14 +45,14 @@ fn A => 0;
|
||||
// CHECK:STDOUT: constants {
|
||||
// CHECK:STDOUT: %A.type: type = fn_type @A [template]
|
||||
// CHECK:STDOUT: %.1: type = tuple_type () [template]
|
||||
// CHECK:STDOUT: %A: <type of A> = struct_value () [template]
|
||||
// CHECK:STDOUT: %A: %A.type = struct_value () [template]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: file {
|
||||
// CHECK:STDOUT: package: <namespace> = namespace [template] {
|
||||
// CHECK:STDOUT: .A = %A.decl
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %A.decl: <type of A> = fn_decl @A [template = constants.%A] {}
|
||||
// CHECK:STDOUT: %A.decl: %A.type = fn_decl @A [template = constants.%A] {}
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @A();
|
||||
@@ -62,14 +62,14 @@ fn A => 0;
|
||||
// CHECK:STDOUT: constants {
|
||||
// CHECK:STDOUT: %A.type: type = fn_type @A [template]
|
||||
// CHECK:STDOUT: %.1: type = tuple_type () [template]
|
||||
// CHECK:STDOUT: %A: <type of A> = struct_value () [template]
|
||||
// CHECK:STDOUT: %A: %A.type = struct_value () [template]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: file {
|
||||
// CHECK:STDOUT: package: <namespace> = namespace [template] {
|
||||
// CHECK:STDOUT: .A = %A.decl
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %A.decl: <type of A> = fn_decl @A [template = constants.%A] {}
|
||||
// CHECK:STDOUT: %A.decl: %A.type = fn_decl @A [template = constants.%A] {}
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @A() {
|
||||
@@ -82,14 +82,14 @@ fn A => 0;
|
||||
// CHECK:STDOUT: constants {
|
||||
// CHECK:STDOUT: %A.type: type = fn_type @A [template]
|
||||
// CHECK:STDOUT: %.1: type = tuple_type () [template]
|
||||
// CHECK:STDOUT: %A: <type of A> = struct_value () [template]
|
||||
// CHECK:STDOUT: %A: %A.type = struct_value () [template]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: file {
|
||||
// CHECK:STDOUT: package: <namespace> = namespace [template] {
|
||||
// CHECK:STDOUT: .A = %A.decl
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %A.decl: <type of A> = fn_decl @A [template = constants.%A] {}
|
||||
// CHECK:STDOUT: %A.decl: %A.type = fn_decl @A [template = constants.%A] {}
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @A();
|
||||
|
||||
+15
-15
@@ -68,14 +68,14 @@ extern fn A();
|
||||
// CHECK:STDOUT: constants {
|
||||
// CHECK:STDOUT: %A.type: type = fn_type @A [template]
|
||||
// CHECK:STDOUT: %.1: type = tuple_type () [template]
|
||||
// CHECK:STDOUT: %A: <type of A> = struct_value () [template]
|
||||
// CHECK:STDOUT: %A: %A.type = struct_value () [template]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: file {
|
||||
// CHECK:STDOUT: package: <namespace> = namespace [template] {
|
||||
// CHECK:STDOUT: .A = %A.decl
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %A.decl: <type of A> = fn_decl @A [template = constants.%A] {}
|
||||
// CHECK:STDOUT: %A.decl: %A.type = fn_decl @A [template = constants.%A] {}
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @A();
|
||||
@@ -85,15 +85,15 @@ extern fn A();
|
||||
// CHECK:STDOUT: constants {
|
||||
// CHECK:STDOUT: %A.type: type = fn_type @A [template]
|
||||
// CHECK:STDOUT: %.1: type = tuple_type () [template]
|
||||
// CHECK:STDOUT: %A: <type of A> = struct_value () [template]
|
||||
// CHECK:STDOUT: %A: %A.type = struct_value () [template]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: file {
|
||||
// CHECK:STDOUT: package: <namespace> = namespace [template] {
|
||||
// CHECK:STDOUT: .A = %A.decl
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %import_ref: <type of A> = import_ref ir0, inst+1, loaded [template = constants.%A]
|
||||
// CHECK:STDOUT: %A.decl: <type of A> = fn_decl @A [template = constants.%A] {}
|
||||
// CHECK:STDOUT: %import_ref: %A.type = import_ref ir0, inst+1, loaded [template = constants.%A]
|
||||
// CHECK:STDOUT: %A.decl: %A.type = fn_decl @A [template = constants.%A] {}
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @A();
|
||||
@@ -103,14 +103,14 @@ extern fn A();
|
||||
// CHECK:STDOUT: constants {
|
||||
// CHECK:STDOUT: %A.type: type = fn_type @A [template]
|
||||
// CHECK:STDOUT: %.1: type = tuple_type () [template]
|
||||
// CHECK:STDOUT: %A: <type of A> = struct_value () [template]
|
||||
// CHECK:STDOUT: %A: %A.type = struct_value () [template]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: file {
|
||||
// CHECK:STDOUT: package: <namespace> = namespace [template] {
|
||||
// CHECK:STDOUT: .A = %A.decl
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %A.decl: <type of A> = fn_decl @A [template = constants.%A] {}
|
||||
// CHECK:STDOUT: %A.decl: %A.type = fn_decl @A [template = constants.%A] {}
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: extern fn @A();
|
||||
@@ -120,15 +120,15 @@ extern fn A();
|
||||
// CHECK:STDOUT: constants {
|
||||
// CHECK:STDOUT: %A.type: type = fn_type @A [template]
|
||||
// CHECK:STDOUT: %.1: type = tuple_type () [template]
|
||||
// CHECK:STDOUT: %A: <type of A> = struct_value () [template]
|
||||
// CHECK:STDOUT: %A: %A.type = struct_value () [template]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: file {
|
||||
// CHECK:STDOUT: package: <namespace> = namespace [template] {
|
||||
// CHECK:STDOUT: .A = %A.decl
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %import_ref: <type of A> = import_ref ir0, inst+1, loaded [template = constants.%A]
|
||||
// CHECK:STDOUT: %A.decl: <type of A> = fn_decl @A [template = constants.%A] {}
|
||||
// CHECK:STDOUT: %import_ref: %A.type = import_ref ir0, inst+1, loaded [template = constants.%A]
|
||||
// CHECK:STDOUT: %A.decl: %A.type = fn_decl @A [template = constants.%A] {}
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @A();
|
||||
@@ -138,14 +138,14 @@ extern fn A();
|
||||
// CHECK:STDOUT: constants {
|
||||
// CHECK:STDOUT: %A.type: type = fn_type @A [template]
|
||||
// CHECK:STDOUT: %.1: type = tuple_type () [template]
|
||||
// CHECK:STDOUT: %A: <type of A> = struct_value () [template]
|
||||
// CHECK:STDOUT: %A: %A.type = struct_value () [template]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: file {
|
||||
// CHECK:STDOUT: package: <namespace> = namespace [template] {
|
||||
// CHECK:STDOUT: .A = %A.decl
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %A.decl: <type of A> = fn_decl @A [template = constants.%A] {}
|
||||
// CHECK:STDOUT: %A.decl: %A.type = fn_decl @A [template = constants.%A] {}
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @A();
|
||||
@@ -155,15 +155,15 @@ extern fn A();
|
||||
// CHECK:STDOUT: constants {
|
||||
// CHECK:STDOUT: %A.type: type = fn_type @A [template]
|
||||
// CHECK:STDOUT: %.1: type = tuple_type () [template]
|
||||
// CHECK:STDOUT: %A: <type of A> = struct_value () [template]
|
||||
// CHECK:STDOUT: %A: %A.type = struct_value () [template]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: file {
|
||||
// CHECK:STDOUT: package: <namespace> = namespace [template] {
|
||||
// CHECK:STDOUT: .A = %A.decl
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %import_ref: <type of A> = import_ref ir0, inst+1, loaded [template = constants.%A]
|
||||
// CHECK:STDOUT: %A.decl: <type of A> = fn_decl @A [template = constants.%A] {}
|
||||
// CHECK:STDOUT: %import_ref: %A.type = import_ref ir0, inst+1, loaded [template = constants.%A]
|
||||
// CHECK:STDOUT: %A.decl: %A.type = fn_decl @A [template = constants.%A] {}
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: extern fn @A();
|
||||
|
||||
@@ -17,9 +17,9 @@ fn G() { F(); }
|
||||
// CHECK:STDOUT: constants {
|
||||
// CHECK:STDOUT: %F.type: type = fn_type @F [template]
|
||||
// CHECK:STDOUT: %.1: type = tuple_type () [template]
|
||||
// CHECK:STDOUT: %F: <type of F> = struct_value () [template]
|
||||
// CHECK:STDOUT: %F: %F.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %G.type: type = fn_type @G [template]
|
||||
// CHECK:STDOUT: %G: <type of G> = struct_value () [template]
|
||||
// CHECK:STDOUT: %G: %G.type = struct_value () [template]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: file {
|
||||
@@ -27,16 +27,16 @@ fn G() { F(); }
|
||||
// CHECK:STDOUT: .F = %F.decl
|
||||
// CHECK:STDOUT: .G = %G.decl
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %F.decl: <type of F> = fn_decl @F [template = constants.%F] {}
|
||||
// CHECK:STDOUT: %G.decl: <type of G> = fn_decl @G [template = constants.%G] {}
|
||||
// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {}
|
||||
// CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] {}
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @F();
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @G() {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %F.ref: <type of F> = name_ref F, file.%F.decl [template = constants.%F]
|
||||
// CHECK:STDOUT: %F.call: init () = call %F.ref()
|
||||
// CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [template = constants.%F]
|
||||
// CHECK:STDOUT: %F.call: init %.1 = call %F.ref()
|
||||
// CHECK:STDOUT: return
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
|
||||
@@ -17,11 +17,11 @@ fn G(a: i32);
|
||||
// CHECK:STDOUT: constants {
|
||||
// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template]
|
||||
// CHECK:STDOUT: %.1: type = tuple_type () [template]
|
||||
// CHECK:STDOUT: %Int32: <type of Int32> = struct_value () [template]
|
||||
// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %F.type: type = fn_type @F [template]
|
||||
// CHECK:STDOUT: %F: <type of F> = struct_value () [template]
|
||||
// CHECK:STDOUT: %F: %F.type = struct_value () [template]
|
||||
// CHECK:STDOUT: %G.type: type = fn_type @G [template]
|
||||
// CHECK:STDOUT: %G: <type of G> = struct_value () [template]
|
||||
// CHECK:STDOUT: %G: %G.type = struct_value () [template]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: file {
|
||||
@@ -31,16 +31,16 @@ fn G(a: i32);
|
||||
// CHECK:STDOUT: .G = %G.decl
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Core: <namespace> = namespace [template] {}
|
||||
// CHECK:STDOUT: %import_ref.1: <type of Int32> = import_ref ir3, inst+3, loaded [template = constants.%Int32]
|
||||
// CHECK:STDOUT: %F.decl: <type of F> = fn_decl @F [template = constants.%F] {
|
||||
// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32]
|
||||
// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {
|
||||
// CHECK:STDOUT: %int.make_type_32.loc11: init type = call constants.%Int32() [template = i32]
|
||||
// CHECK:STDOUT: %.loc11_9.1: type = value_of_initializer %int.make_type_32.loc11 [template = i32]
|
||||
// CHECK:STDOUT: %.loc11_9.2: type = converted %int.make_type_32.loc11, %.loc11_9.1 [template = i32]
|
||||
// CHECK:STDOUT: %a.loc11_6.1: i32 = param a
|
||||
// CHECK:STDOUT: @F.%a: i32 = bind_name a, %a.loc11_6.1
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %import_ref.2: <type of Int32> = import_ref ir3, inst+3, loaded [template = constants.%Int32]
|
||||
// CHECK:STDOUT: %G.decl: <type of G> = fn_decl @G [template = constants.%G] {
|
||||
// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32]
|
||||
// CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] {
|
||||
// CHECK:STDOUT: %int.make_type_32.loc13: init type = call constants.%Int32() [template = i32]
|
||||
// CHECK:STDOUT: %.loc13_9.1: type = value_of_initializer %int.make_type_32.loc13 [template = i32]
|
||||
// CHECK:STDOUT: %.loc13_9.2: type = converted %int.make_type_32.loc13, %.loc13_9.1 [template = i32]
|
||||
|
||||
Reference in New Issue
Block a user