mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-06 09:34:42 +01:00
Handle more kinds of templated conversion. (#7662)
Generalize ConvertToValue template action to handle other kinds of conversion target that don't perform initialization. Initializing conversions will need more work since they also need to use a splice to form the storage block.
This commit is contained in:
@@ -195,14 +195,13 @@ fn H() { G(3); }
|
||||
// CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.specific_fn: <specific function> = specific_function %Int.as.ImplicitAs.impl.Convert.69e, @Int.as.ImplicitAs.impl.Convert(%int_32) [concrete]
|
||||
// CHECK:STDOUT: %bound_method.545: <bound method> = bound_method %int_3.410, %Int.as.ImplicitAs.impl.Convert.specific_fn [concrete]
|
||||
// CHECK:STDOUT: %inst.splice_block: <instruction> = inst_value [concrete] {
|
||||
// CHECK:STDOUT: %.774: Core.IntLiteral = splice_block %.60a [concrete = %int_3.1ba] {
|
||||
// CHECK:STDOUT: %.354: Core.IntLiteral = splice_block %.238 [concrete = %int_3.1ba] {
|
||||
// CHECK:STDOUT: %impl.elem0: %.e3f = impl_witness_access %ImplicitAs.impl_witness.590, element0 [concrete = %Int.as.ImplicitAs.impl.Convert.69e]
|
||||
// CHECK:STDOUT: %bound_method.1cb: <bound method> = bound_method %int_3.410, %impl.elem0 [concrete = %Int.as.ImplicitAs.impl.Convert.bound]
|
||||
// CHECK:STDOUT: %specific_fn: <specific function> = specific_function %impl.elem0, @Int.as.ImplicitAs.impl.Convert(%int_32) [concrete = %Int.as.ImplicitAs.impl.Convert.specific_fn]
|
||||
// CHECK:STDOUT: %bound_method.ae8: <bound method> = bound_method %int_3.410, %specific_fn [concrete = %bound_method.545]
|
||||
// CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.call: init Core.IntLiteral = call %bound_method.ae8(%int_3.410) [concrete = %int_3.1ba]
|
||||
// CHECK:STDOUT: %.238: Core.IntLiteral = value_of_initializer %Int.as.ImplicitAs.impl.Convert.call [concrete = %int_3.1ba]
|
||||
// CHECK:STDOUT: %.60a: Core.IntLiteral = converted %int_3.410, %.238 [concrete = %int_3.1ba]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
|
||||
Reference in New Issue
Block a user