2
2
// Exceptions. See /LICENSE for license information.
3
3
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
4
4
//
5
+ // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only".
6
+ // EXTRA-ARGS: --dump-sem-ir-ranges=if-present
7
+ //
5
8
// AUTOUPDATE
6
9
// TIP: To test this file alone, run:
7
10
// TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/check/testdata/namespace/alias.carbon
@@ -79,7 +82,7 @@ fn D() -> i32 { return C(); }
79
82
// CHECK:STDOUT: %NS: <namespace> = namespace [concrete] {
80
83
// CHECK:STDOUT: .A = %A.decl
81
84
// CHECK:STDOUT: }
82
- // CHECK:STDOUT: %NS.ref.loc13 : <namespace> = name_ref NS, %NS [concrete = %NS]
85
+ // CHECK:STDOUT: %NS.ref.loc16 : <namespace> = name_ref NS, %NS [concrete = %NS]
83
86
// CHECK:STDOUT: %ns: <namespace> = bind_alias ns, %NS [concrete = %NS]
84
87
// CHECK:STDOUT: %A.decl: %A.type = fn_decl @A [concrete = constants.%A] {
85
88
// CHECK:STDOUT: %return.patt: %pattern_type.7ce = return_slot_pattern [concrete]
@@ -99,7 +102,7 @@ fn D() -> i32 { return C(); }
99
102
// CHECK:STDOUT: %return.param: ref %i32 = out_param call_param0
100
103
// CHECK:STDOUT: %return: ref %i32 = return_slot %return.param
101
104
// CHECK:STDOUT: }
102
- // CHECK:STDOUT: %NS.ref.loc19 : <namespace> = name_ref NS, %NS [concrete = %NS]
105
+ // CHECK:STDOUT: %NS.ref.loc22 : <namespace> = name_ref NS, %NS [concrete = %NS]
103
106
// CHECK:STDOUT: %A.ref: %A.type = name_ref A, %A.decl [concrete = constants.%A]
104
107
// CHECK:STDOUT: %C: %A.type = bind_alias C, %A.decl [concrete = constants.%A]
105
108
// CHECK:STDOUT: %D.decl: %D.type = fn_decl @D [concrete = constants.%D] {
@@ -117,31 +120,31 @@ fn D() -> i32 { return C(); }
117
120
// CHECK:STDOUT: !entry:
118
121
// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6]
119
122
// CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956]
120
- // CHECK:STDOUT: %bound_method.loc15_28 .1: <bound method> = bound_method %int_0, %impl.elem0 [concrete = constants.%Convert.bound]
123
+ // CHECK:STDOUT: %bound_method.loc18_28 .1: <bound method> = bound_method %int_0, %impl.elem0 [concrete = constants.%Convert.bound]
121
124
// CHECK:STDOUT: %specific_fn: <specific function> = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn]
122
- // CHECK:STDOUT: %bound_method.loc15_28 .2: <bound method> = bound_method %int_0, %specific_fn [concrete = constants.%bound_method]
123
- // CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc15_28 .2(%int_0) [concrete = constants.%int_0.6a9]
124
- // CHECK:STDOUT: %.loc15_28 .1: %i32 = value_of_initializer %int.convert_checked [concrete = constants.%int_0.6a9]
125
- // CHECK:STDOUT: %.loc15_28 .2: %i32 = converted %int_0, %.loc15_28 .1 [concrete = constants.%int_0.6a9]
126
- // CHECK:STDOUT: return %.loc15_28 .2
125
+ // CHECK:STDOUT: %bound_method.loc18_28 .2: <bound method> = bound_method %int_0, %specific_fn [concrete = constants.%bound_method]
126
+ // CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc18_28 .2(%int_0) [concrete = constants.%int_0.6a9]
127
+ // CHECK:STDOUT: %.loc18_28 .1: %i32 = value_of_initializer %int.convert_checked [concrete = constants.%int_0.6a9]
128
+ // CHECK:STDOUT: %.loc18_28 .2: %i32 = converted %int_0, %.loc18_28 .1 [concrete = constants.%int_0.6a9]
129
+ // CHECK:STDOUT: return %.loc18_28 .2
127
130
// CHECK:STDOUT: }
128
131
// CHECK:STDOUT:
129
132
// CHECK:STDOUT: fn @B() -> %i32 {
130
133
// CHECK:STDOUT: !entry:
131
134
// CHECK:STDOUT: %ns.ref: <namespace> = name_ref ns, file.%ns [concrete = file.%NS]
132
135
// CHECK:STDOUT: %A.ref: %A.type = name_ref A, file.%A.decl [concrete = constants.%A]
133
136
// CHECK:STDOUT: %A.call: init %i32 = call %A.ref()
134
- // CHECK:STDOUT: %.loc17_30 .1: %i32 = value_of_initializer %A.call
135
- // CHECK:STDOUT: %.loc17_30 .2: %i32 = converted %A.call, %.loc17_30 .1
136
- // CHECK:STDOUT: return %.loc17_30 .2
137
+ // CHECK:STDOUT: %.loc20_30 .1: %i32 = value_of_initializer %A.call
138
+ // CHECK:STDOUT: %.loc20_30 .2: %i32 = converted %A.call, %.loc20_30 .1
139
+ // CHECK:STDOUT: return %.loc20_30 .2
137
140
// CHECK:STDOUT: }
138
141
// CHECK:STDOUT:
139
142
// CHECK:STDOUT: fn @D() -> %i32 {
140
143
// CHECK:STDOUT: !entry:
141
144
// CHECK:STDOUT: %C.ref: %A.type = name_ref C, file.%C [concrete = constants.%A]
142
145
// CHECK:STDOUT: %A.call: init %i32 = call %C.ref()
143
- // CHECK:STDOUT: %.loc21_27 .1: %i32 = value_of_initializer %A.call
144
- // CHECK:STDOUT: %.loc21_27 .2: %i32 = converted %A.call, %.loc21_27 .1
145
- // CHECK:STDOUT: return %.loc21_27 .2
146
+ // CHECK:STDOUT: %.loc24_27 .1: %i32 = value_of_initializer %A.call
147
+ // CHECK:STDOUT: %.loc24_27 .2: %i32 = converted %A.call, %.loc24_27 .1
148
+ // CHECK:STDOUT: return %.loc24_27 .2
146
149
// CHECK:STDOUT: }
147
150
// CHECK:STDOUT:
0 commit comments