initializer_list.carbon 36 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374
  1. // Part of the Carbon Language project, under the Apache License v2.0 with LLVM
  2. // Exceptions. See /LICENSE for license information.
  3. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  4. //
  5. // INCLUDE-FILE: toolchain/testing/testdata/min_prelude/full.carbon
  6. //
  7. // AUTOUPDATE
  8. // TIP: To test this file alone, run:
  9. // TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/check/testdata/interop/cpp/stdlib/initializer_list.carbon
  10. // TIP: To dump output, run:
  11. // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/interop/cpp/stdlib/initializer_list.carbon
  12. // --- initializer_list.h
  13. namespace std {
  14. using size_t = __SIZE_TYPE__;
  15. template<typename T> class initializer_list {
  16. public:
  17. initializer_list() {}
  18. const T* begin() { return data_; }
  19. const T* end() { return data_ + size_; }
  20. size_t size() { return size_; }
  21. private:
  22. const T* data_ = nullptr;
  23. size_t size_ = 0;
  24. };
  25. }
  26. auto Consume(std::initializer_list<int> il) -> void;
  27. struct InitListConstructor {
  28. InitListConstructor(std::initializer_list<int> il) {}
  29. };
  30. // --- convert.carbon
  31. library "[[@TEST_NAME]]";
  32. import Cpp library "initializer_list.h";
  33. //@dump-sem-ir-begin
  34. fn F() {
  35. let _: Cpp.std.initializer_list(i32) = (1, 2, 3);
  36. Cpp.Consume((1, 2, 3));
  37. let _: Cpp.InitListConstructor = (1, 2, 3);
  38. }
  39. //@dump-sem-ir-end
  40. // CHECK:STDOUT: --- convert.carbon
  41. // CHECK:STDOUT:
  42. // CHECK:STDOUT: constants {
  43. // CHECK:STDOUT: %F.type: type = fn_type @F [concrete]
  44. // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
  45. // CHECK:STDOUT: %F: %F.type = struct_value () [concrete]
  46. // CHECK:STDOUT: %initializer_list.type: type = cpp_type_template_type initializer_list [concrete]
  47. // CHECK:STDOUT: %initializer_list.template: %initializer_list.type = struct_value () [concrete]
  48. // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete]
  49. // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete]
  50. // CHECK:STDOUT: %initializer_list: type = class_type @initializer_list [concrete]
  51. // CHECK:STDOUT: %pattern_type.22f: type = pattern_type %initializer_list [concrete]
  52. // CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete]
  53. // CHECK:STDOUT: %int_2.ecc: Core.IntLiteral = int_value 2 [concrete]
  54. // CHECK:STDOUT: %int_3.1ba: Core.IntLiteral = int_value 3 [concrete]
  55. // CHECK:STDOUT: %tuple.type: type = tuple_type (Core.IntLiteral, Core.IntLiteral, Core.IntLiteral) [concrete]
  56. // CHECK:STDOUT: %tuple: %tuple.type = tuple_value (%int_1.5b8, %int_2.ecc, %int_3.1ba) [concrete]
  57. // CHECK:STDOUT: %array_type: type = array_type %int_3.1ba, %i32 [concrete]
  58. // CHECK:STDOUT: %pattern_type.5d8: type = pattern_type %array_type [concrete]
  59. // CHECK:STDOUT: %.b61: Core.Form = init_form %initializer_list [concrete]
  60. // CHECK:STDOUT: %initializer_list.initializer_list.type.9fcb7f.1: type = fn_type @initializer_list.initializer_list.loc8 [concrete]
  61. // CHECK:STDOUT: %initializer_list.initializer_list.643507.1: %initializer_list.initializer_list.type.9fcb7f.1 = struct_value () [concrete]
  62. // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete]
  63. // CHECK:STDOUT: %ImplicitAs.type.e8c: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete]
  64. // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic]
  65. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic]
  66. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic]
  67. // CHECK:STDOUT: %ImplicitAs.impl_witness.6bc: <witness> = impl_witness imports.%ImplicitAs.impl_witness_table.74f, @Core.IntLiteral.as.ImplicitAs.impl(%int_32) [concrete]
  68. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%int_32) [concrete]
  69. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete]
  70. // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete]
  71. // CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs.WithSelf(%i32, %ImplicitAs.facet) [concrete]
  72. // CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet [concrete]
  73. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.215: <bound method> = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete]
  74. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: <specific function> = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete]
  75. // CHECK:STDOUT: %bound_method.38b: <bound method> = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete]
  76. // CHECK:STDOUT: %int_1.5d2: %i32 = int_value 1 [concrete]
  77. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.4e5: <bound method> = bound_method %int_2.ecc, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete]
  78. // CHECK:STDOUT: %bound_method.646: <bound method> = bound_method %int_2.ecc, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete]
  79. // CHECK:STDOUT: %int_2.ef8: %i32 = int_value 2 [concrete]
  80. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.061: <bound method> = bound_method %int_3.1ba, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete]
  81. // CHECK:STDOUT: %bound_method.fa7: <bound method> = bound_method %int_3.1ba, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete]
  82. // CHECK:STDOUT: %int_3.822: %i32 = int_value 3 [concrete]
  83. // CHECK:STDOUT: %array: %array_type = tuple_value (%int_1.5d2, %int_2.ef8, %int_3.822) [concrete]
  84. // CHECK:STDOUT: %Consume.cpp_overload_set.type: type = cpp_overload_set_type @Consume.cpp_overload_set [concrete]
  85. // CHECK:STDOUT: %Consume.cpp_overload_set.value: %Consume.cpp_overload_set.type = cpp_overload_set_value @Consume.cpp_overload_set [concrete]
  86. // CHECK:STDOUT: %ptr.82f: type = ptr_type %initializer_list [concrete]
  87. // CHECK:STDOUT: %Consume__carbon_thunk.type: type = fn_type @Consume__carbon_thunk [concrete]
  88. // CHECK:STDOUT: %Consume__carbon_thunk: %Consume__carbon_thunk.type = struct_value () [concrete]
  89. // CHECK:STDOUT: %initializer_list.initializer_list.type.9fcb7f.2: type = fn_type @initializer_list.initializer_list.loc10 [concrete]
  90. // CHECK:STDOUT: %initializer_list.initializer_list.643507.2: %initializer_list.initializer_list.type.9fcb7f.2 = struct_value () [concrete]
  91. // CHECK:STDOUT: %InitListConstructor: type = class_type @InitListConstructor [concrete]
  92. // CHECK:STDOUT: %pattern_type.92d: type = pattern_type %InitListConstructor [concrete]
  93. // CHECK:STDOUT: %ptr.79d: type = ptr_type %InitListConstructor [concrete]
  94. // CHECK:STDOUT: %InitListConstructor__carbon_thunk.type: type = fn_type @InitListConstructor__carbon_thunk [concrete]
  95. // CHECK:STDOUT: %InitListConstructor__carbon_thunk: %InitListConstructor__carbon_thunk.type = struct_value () [concrete]
  96. // CHECK:STDOUT: %initializer_list.initializer_list.type.9fcb7f.3: type = fn_type @initializer_list.initializer_list.loc12 [concrete]
  97. // CHECK:STDOUT: %initializer_list.initializer_list.643507.3: %initializer_list.initializer_list.type.9fcb7f.3 = struct_value () [concrete]
  98. // CHECK:STDOUT: %InitListConstructor.cpp_destructor.type: type = fn_type @InitListConstructor.cpp_destructor [concrete]
  99. // CHECK:STDOUT: %InitListConstructor.cpp_destructor: %InitListConstructor.cpp_destructor.type = struct_value () [concrete]
  100. // CHECK:STDOUT: %initializer_list.cpp_destructor.type: type = fn_type @initializer_list.cpp_destructor [concrete]
  101. // CHECK:STDOUT: %initializer_list.cpp_destructor: %initializer_list.cpp_destructor.type = struct_value () [concrete]
  102. // CHECK:STDOUT: %Destroy.Op.type.bae255.2: type = fn_type @Destroy.Op.loc12 [concrete]
  103. // CHECK:STDOUT: %Destroy.Op.651ba6.2: %Destroy.Op.type.bae255.2 = struct_value () [concrete]
  104. // CHECK:STDOUT: }
  105. // CHECK:STDOUT:
  106. // CHECK:STDOUT: imports {
  107. // CHECK:STDOUT: %Cpp: <namespace> = namespace file.%Cpp.import_cpp, [concrete] {
  108. // CHECK:STDOUT: .std = %std
  109. // CHECK:STDOUT: .Consume = %Consume.cpp_overload_set.value
  110. // CHECK:STDOUT: .InitListConstructor = %InitListConstructor.decl
  111. // CHECK:STDOUT: import Cpp//...
  112. // CHECK:STDOUT: }
  113. // CHECK:STDOUT: %std: <namespace> = namespace [concrete] {
  114. // CHECK:STDOUT: .initializer_list = %initializer_list.template
  115. // CHECK:STDOUT: import Cpp//...
  116. // CHECK:STDOUT: }
  117. // CHECK:STDOUT: %initializer_list.template: %initializer_list.type = struct_value () [concrete = constants.%initializer_list.template]
  118. // CHECK:STDOUT: %Core.import_ref.42d: @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert.type (%Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6) = import_ref Core//prelude/types/int, loc{{\d+_\d+}}, loaded [symbolic = @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert (constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2)]
  119. // CHECK:STDOUT: %ImplicitAs.impl_witness_table.74f = impl_witness_table (%Core.import_ref.42d), @Core.IntLiteral.as.ImplicitAs.impl [concrete]
  120. // CHECK:STDOUT: %Consume.cpp_overload_set.value: %Consume.cpp_overload_set.type = cpp_overload_set_value @Consume.cpp_overload_set [concrete = constants.%Consume.cpp_overload_set.value]
  121. // CHECK:STDOUT: %Consume__carbon_thunk.decl: %Consume__carbon_thunk.type = fn_decl @Consume__carbon_thunk [concrete = constants.%Consume__carbon_thunk] {
  122. // CHECK:STDOUT: <elided>
  123. // CHECK:STDOUT: } {
  124. // CHECK:STDOUT: <elided>
  125. // CHECK:STDOUT: }
  126. // CHECK:STDOUT: %InitListConstructor.decl: type = class_decl @InitListConstructor [concrete = constants.%InitListConstructor] {} {}
  127. // CHECK:STDOUT: %InitListConstructor__carbon_thunk.decl: %InitListConstructor__carbon_thunk.type = fn_decl @InitListConstructor__carbon_thunk [concrete = constants.%InitListConstructor__carbon_thunk] {
  128. // CHECK:STDOUT: <elided>
  129. // CHECK:STDOUT: } {
  130. // CHECK:STDOUT: <elided>
  131. // CHECK:STDOUT: }
  132. // CHECK:STDOUT: }
  133. // CHECK:STDOUT:
  134. // CHECK:STDOUT: generated {
  135. // CHECK:STDOUT: %initializer_list.initializer_list.decl.2bdc3e.1: %initializer_list.initializer_list.type.9fcb7f.1 = fn_decl @initializer_list.initializer_list.loc8 [concrete = constants.%initializer_list.initializer_list.643507.1] {
  136. // CHECK:STDOUT: %_.patt: %pattern_type.5d8 = value_binding_pattern _ [concrete]
  137. // CHECK:STDOUT: %_.param_patt: %pattern_type.5d8 = value_param_pattern %_.patt [concrete]
  138. // CHECK:STDOUT: %return.patt: %pattern_type.22f = return_slot_pattern [concrete]
  139. // CHECK:STDOUT: %return.param_patt: %pattern_type.22f = out_param_pattern %return.patt [concrete]
  140. // CHECK:STDOUT: } {
  141. // CHECK:STDOUT: %.loc8: Core.Form = init_form constants.%initializer_list [concrete = constants.%.b61]
  142. // CHECK:STDOUT: %_.param: %array_type = value_param call_param0
  143. // CHECK:STDOUT: %_: %array_type = value_binding _, %_.param
  144. // CHECK:STDOUT: %return.param: ref %initializer_list = out_param call_param1
  145. // CHECK:STDOUT: %return: ref %initializer_list = return_slot %return.param
  146. // CHECK:STDOUT: }
  147. // CHECK:STDOUT: %initializer_list.initializer_list.decl.2bdc3e.2: %initializer_list.initializer_list.type.9fcb7f.2 = fn_decl @initializer_list.initializer_list.loc10 [concrete = constants.%initializer_list.initializer_list.643507.2] {
  148. // CHECK:STDOUT: %_.patt: %pattern_type.5d8 = value_binding_pattern _ [concrete]
  149. // CHECK:STDOUT: %_.param_patt: %pattern_type.5d8 = value_param_pattern %_.patt [concrete]
  150. // CHECK:STDOUT: %return.patt: %pattern_type.22f = return_slot_pattern [concrete]
  151. // CHECK:STDOUT: %return.param_patt: %pattern_type.22f = out_param_pattern %return.patt [concrete]
  152. // CHECK:STDOUT: } {
  153. // CHECK:STDOUT: %.loc10: Core.Form = init_form constants.%initializer_list [concrete = constants.%.b61]
  154. // CHECK:STDOUT: %_.param: %array_type = value_param call_param0
  155. // CHECK:STDOUT: %_: %array_type = value_binding _, %_.param
  156. // CHECK:STDOUT: %return.param: ref %initializer_list = out_param call_param1
  157. // CHECK:STDOUT: %return: ref %initializer_list = return_slot %return.param
  158. // CHECK:STDOUT: }
  159. // CHECK:STDOUT: %initializer_list.initializer_list.decl.2bdc3e.3: %initializer_list.initializer_list.type.9fcb7f.3 = fn_decl @initializer_list.initializer_list.loc12 [concrete = constants.%initializer_list.initializer_list.643507.3] {
  160. // CHECK:STDOUT: %_.patt: %pattern_type.5d8 = value_binding_pattern _ [concrete]
  161. // CHECK:STDOUT: %_.param_patt: %pattern_type.5d8 = value_param_pattern %_.patt [concrete]
  162. // CHECK:STDOUT: %return.patt: %pattern_type.22f = return_slot_pattern [concrete]
  163. // CHECK:STDOUT: %return.param_patt: %pattern_type.22f = out_param_pattern %return.patt [concrete]
  164. // CHECK:STDOUT: } {
  165. // CHECK:STDOUT: %.loc12: Core.Form = init_form constants.%initializer_list [concrete = constants.%.b61]
  166. // CHECK:STDOUT: %_.param: %array_type = value_param call_param0
  167. // CHECK:STDOUT: %_: %array_type = value_binding _, %_.param
  168. // CHECK:STDOUT: %return.param: ref %initializer_list = out_param call_param1
  169. // CHECK:STDOUT: %return: ref %initializer_list = return_slot %return.param
  170. // CHECK:STDOUT: }
  171. // CHECK:STDOUT: }
  172. // CHECK:STDOUT:
  173. // CHECK:STDOUT: file {
  174. // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] {} {}
  175. // CHECK:STDOUT: }
  176. // CHECK:STDOUT:
  177. // CHECK:STDOUT: fn @F() {
  178. // CHECK:STDOUT: !entry:
  179. // CHECK:STDOUT: name_binding_decl {
  180. // CHECK:STDOUT: %_.patt.loc8: %pattern_type.22f = value_binding_pattern _ [concrete]
  181. // CHECK:STDOUT: }
  182. // CHECK:STDOUT: %int_1.loc8_43: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
  183. // CHECK:STDOUT: %int_2.loc8_46: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc]
  184. // CHECK:STDOUT: %int_3.loc8_49: Core.IntLiteral = int_value 3 [concrete = constants.%int_3.1ba]
  185. // CHECK:STDOUT: %.loc8_50.1: %tuple.type = tuple_literal (%int_1.loc8_43, %int_2.loc8_46, %int_3.loc8_49) [concrete = constants.%tuple]
  186. // CHECK:STDOUT: <elided>
  187. // CHECK:STDOUT: %int_3.loc8_50: Core.IntLiteral = int_value 3 [concrete = constants.%int_3.1ba]
  188. // CHECK:STDOUT: %array_type.loc8: type = array_type %int_3.loc8_50, %i32.2 [concrete = constants.%array_type]
  189. // CHECK:STDOUT: %.loc8_50.2: ref %initializer_list = temporary_storage
  190. // CHECK:STDOUT: %impl.elem0.loc8_50.1: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5]
  191. // CHECK:STDOUT: %bound_method.loc8_50.1: <bound method> = bound_method %int_1.loc8_43, %impl.elem0.loc8_50.1 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.215]
  192. // CHECK:STDOUT: %specific_fn.loc8_50.1: <specific function> = specific_function %impl.elem0.loc8_50.1, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
  193. // CHECK:STDOUT: %bound_method.loc8_50.2: <bound method> = bound_method %int_1.loc8_43, %specific_fn.loc8_50.1 [concrete = constants.%bound_method.38b]
  194. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc8_50.1: init %i32 = call %bound_method.loc8_50.2(%int_1.loc8_43) [concrete = constants.%int_1.5d2]
  195. // CHECK:STDOUT: %.loc8_50.3: init %i32 = converted %int_1.loc8_43, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc8_50.1 [concrete = constants.%int_1.5d2]
  196. // CHECK:STDOUT: %.loc8_50.4: ref %array_type = temporary_storage
  197. // CHECK:STDOUT: %int_0.loc8: Core.IntLiteral = int_value 0 [concrete = constants.%int_0]
  198. // CHECK:STDOUT: %.loc8_50.5: ref %i32 = array_index %.loc8_50.4, %int_0.loc8
  199. // CHECK:STDOUT: %.loc8_50.6: init %i32 to %.loc8_50.5 = in_place_init %.loc8_50.3 [concrete = constants.%int_1.5d2]
  200. // CHECK:STDOUT: %impl.elem0.loc8_50.2: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5]
  201. // CHECK:STDOUT: %bound_method.loc8_50.3: <bound method> = bound_method %int_2.loc8_46, %impl.elem0.loc8_50.2 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.4e5]
  202. // CHECK:STDOUT: %specific_fn.loc8_50.2: <specific function> = specific_function %impl.elem0.loc8_50.2, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
  203. // CHECK:STDOUT: %bound_method.loc8_50.4: <bound method> = bound_method %int_2.loc8_46, %specific_fn.loc8_50.2 [concrete = constants.%bound_method.646]
  204. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc8_50.2: init %i32 = call %bound_method.loc8_50.4(%int_2.loc8_46) [concrete = constants.%int_2.ef8]
  205. // CHECK:STDOUT: %.loc8_50.7: init %i32 = converted %int_2.loc8_46, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc8_50.2 [concrete = constants.%int_2.ef8]
  206. // CHECK:STDOUT: %int_1.loc8_50: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
  207. // CHECK:STDOUT: %.loc8_50.8: ref %i32 = array_index %.loc8_50.4, %int_1.loc8_50
  208. // CHECK:STDOUT: %.loc8_50.9: init %i32 to %.loc8_50.8 = in_place_init %.loc8_50.7 [concrete = constants.%int_2.ef8]
  209. // CHECK:STDOUT: %impl.elem0.loc8_50.3: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5]
  210. // CHECK:STDOUT: %bound_method.loc8_50.5: <bound method> = bound_method %int_3.loc8_49, %impl.elem0.loc8_50.3 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.061]
  211. // CHECK:STDOUT: %specific_fn.loc8_50.3: <specific function> = specific_function %impl.elem0.loc8_50.3, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
  212. // CHECK:STDOUT: %bound_method.loc8_50.6: <bound method> = bound_method %int_3.loc8_49, %specific_fn.loc8_50.3 [concrete = constants.%bound_method.fa7]
  213. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc8_50.3: init %i32 = call %bound_method.loc8_50.6(%int_3.loc8_49) [concrete = constants.%int_3.822]
  214. // CHECK:STDOUT: %.loc8_50.10: init %i32 = converted %int_3.loc8_49, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc8_50.3 [concrete = constants.%int_3.822]
  215. // CHECK:STDOUT: %int_2.loc8_50: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc]
  216. // CHECK:STDOUT: %.loc8_50.11: ref %i32 = array_index %.loc8_50.4, %int_2.loc8_50
  217. // CHECK:STDOUT: %.loc8_50.12: init %i32 to %.loc8_50.11 = in_place_init %.loc8_50.10 [concrete = constants.%int_3.822]
  218. // CHECK:STDOUT: %.loc8_50.13: init %array_type to %.loc8_50.4 = array_init (%.loc8_50.6, %.loc8_50.9, %.loc8_50.12) [concrete = constants.%array]
  219. // CHECK:STDOUT: %.loc8_50.14: init %array_type = converted %.loc8_50.1, %.loc8_50.13 [concrete = constants.%array]
  220. // CHECK:STDOUT: %.loc8_50.15: ref %array_type = temporary %.loc8_50.4, %.loc8_50.14
  221. // CHECK:STDOUT: %.loc8_50.16: %array_type = acquire_value %.loc8_50.15
  222. // CHECK:STDOUT: %initializer_list.initializer_list.call.loc8: init %initializer_list to %.loc8_50.2 = call generated.%initializer_list.initializer_list.decl.2bdc3e.1(%.loc8_50.16)
  223. // CHECK:STDOUT: %.loc8_50.17: init %initializer_list = converted %.loc8_50.1, %initializer_list.initializer_list.call.loc8
  224. // CHECK:STDOUT: %.loc8_50.18: ref %initializer_list = temporary %.loc8_50.2, %.loc8_50.17
  225. // CHECK:STDOUT: %.loc8_50.19: %initializer_list = acquire_value %.loc8_50.18
  226. // CHECK:STDOUT: %_.loc8: %initializer_list = value_binding _, %.loc8_50.19
  227. // CHECK:STDOUT: %Cpp.ref.loc10: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  228. // CHECK:STDOUT: %Consume.ref: %Consume.cpp_overload_set.type = name_ref Consume, imports.%Consume.cpp_overload_set.value [concrete = constants.%Consume.cpp_overload_set.value]
  229. // CHECK:STDOUT: %int_1.loc10_16: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
  230. // CHECK:STDOUT: %int_2.loc10_19: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc]
  231. // CHECK:STDOUT: %int_3.loc10_22: Core.IntLiteral = int_value 3 [concrete = constants.%int_3.1ba]
  232. // CHECK:STDOUT: %.loc10_23.1: %tuple.type = tuple_literal (%int_1.loc10_16, %int_2.loc10_19, %int_3.loc10_22) [concrete = constants.%tuple]
  233. // CHECK:STDOUT: <elided>
  234. // CHECK:STDOUT: %int_3.loc10_23: Core.IntLiteral = int_value 3 [concrete = constants.%int_3.1ba]
  235. // CHECK:STDOUT: %array_type.loc10: type = array_type %int_3.loc10_23, %i32.4 [concrete = constants.%array_type]
  236. // CHECK:STDOUT: %.loc10_23.2: ref %initializer_list = temporary_storage
  237. // CHECK:STDOUT: %impl.elem0.loc10_23.1: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5]
  238. // CHECK:STDOUT: %bound_method.loc10_23.1: <bound method> = bound_method %int_1.loc10_16, %impl.elem0.loc10_23.1 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.215]
  239. // CHECK:STDOUT: %specific_fn.loc10_23.1: <specific function> = specific_function %impl.elem0.loc10_23.1, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
  240. // CHECK:STDOUT: %bound_method.loc10_23.2: <bound method> = bound_method %int_1.loc10_16, %specific_fn.loc10_23.1 [concrete = constants.%bound_method.38b]
  241. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc10_23.1: init %i32 = call %bound_method.loc10_23.2(%int_1.loc10_16) [concrete = constants.%int_1.5d2]
  242. // CHECK:STDOUT: %.loc10_23.3: init %i32 = converted %int_1.loc10_16, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc10_23.1 [concrete = constants.%int_1.5d2]
  243. // CHECK:STDOUT: %.loc10_23.4: ref %array_type = temporary_storage
  244. // CHECK:STDOUT: %int_0.loc10: Core.IntLiteral = int_value 0 [concrete = constants.%int_0]
  245. // CHECK:STDOUT: %.loc10_23.5: ref %i32 = array_index %.loc10_23.4, %int_0.loc10
  246. // CHECK:STDOUT: %.loc10_23.6: init %i32 to %.loc10_23.5 = in_place_init %.loc10_23.3 [concrete = constants.%int_1.5d2]
  247. // CHECK:STDOUT: %impl.elem0.loc10_23.2: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5]
  248. // CHECK:STDOUT: %bound_method.loc10_23.3: <bound method> = bound_method %int_2.loc10_19, %impl.elem0.loc10_23.2 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.4e5]
  249. // CHECK:STDOUT: %specific_fn.loc10_23.2: <specific function> = specific_function %impl.elem0.loc10_23.2, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
  250. // CHECK:STDOUT: %bound_method.loc10_23.4: <bound method> = bound_method %int_2.loc10_19, %specific_fn.loc10_23.2 [concrete = constants.%bound_method.646]
  251. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc10_23.2: init %i32 = call %bound_method.loc10_23.4(%int_2.loc10_19) [concrete = constants.%int_2.ef8]
  252. // CHECK:STDOUT: %.loc10_23.7: init %i32 = converted %int_2.loc10_19, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc10_23.2 [concrete = constants.%int_2.ef8]
  253. // CHECK:STDOUT: %int_1.loc10_23: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
  254. // CHECK:STDOUT: %.loc10_23.8: ref %i32 = array_index %.loc10_23.4, %int_1.loc10_23
  255. // CHECK:STDOUT: %.loc10_23.9: init %i32 to %.loc10_23.8 = in_place_init %.loc10_23.7 [concrete = constants.%int_2.ef8]
  256. // CHECK:STDOUT: %impl.elem0.loc10_23.3: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5]
  257. // CHECK:STDOUT: %bound_method.loc10_23.5: <bound method> = bound_method %int_3.loc10_22, %impl.elem0.loc10_23.3 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.061]
  258. // CHECK:STDOUT: %specific_fn.loc10_23.3: <specific function> = specific_function %impl.elem0.loc10_23.3, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
  259. // CHECK:STDOUT: %bound_method.loc10_23.6: <bound method> = bound_method %int_3.loc10_22, %specific_fn.loc10_23.3 [concrete = constants.%bound_method.fa7]
  260. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc10_23.3: init %i32 = call %bound_method.loc10_23.6(%int_3.loc10_22) [concrete = constants.%int_3.822]
  261. // CHECK:STDOUT: %.loc10_23.10: init %i32 = converted %int_3.loc10_22, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc10_23.3 [concrete = constants.%int_3.822]
  262. // CHECK:STDOUT: %int_2.loc10_23: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc]
  263. // CHECK:STDOUT: %.loc10_23.11: ref %i32 = array_index %.loc10_23.4, %int_2.loc10_23
  264. // CHECK:STDOUT: %.loc10_23.12: init %i32 to %.loc10_23.11 = in_place_init %.loc10_23.10 [concrete = constants.%int_3.822]
  265. // CHECK:STDOUT: %.loc10_23.13: init %array_type to %.loc10_23.4 = array_init (%.loc10_23.6, %.loc10_23.9, %.loc10_23.12) [concrete = constants.%array]
  266. // CHECK:STDOUT: %.loc10_23.14: init %array_type = converted %.loc10_23.1, %.loc10_23.13 [concrete = constants.%array]
  267. // CHECK:STDOUT: %.loc10_23.15: ref %array_type = temporary %.loc10_23.4, %.loc10_23.14
  268. // CHECK:STDOUT: %.loc10_23.16: %array_type = acquire_value %.loc10_23.15
  269. // CHECK:STDOUT: %initializer_list.initializer_list.call.loc10: init %initializer_list to %.loc10_23.2 = call generated.%initializer_list.initializer_list.decl.2bdc3e.2(%.loc10_23.16)
  270. // CHECK:STDOUT: %.loc10_23.17: init %initializer_list = converted %.loc10_23.1, %initializer_list.initializer_list.call.loc10
  271. // CHECK:STDOUT: %.loc10_23.18: ref %initializer_list = temporary %.loc10_23.2, %.loc10_23.17
  272. // CHECK:STDOUT: %.loc10_23.19: %initializer_list = acquire_value %.loc10_23.18
  273. // CHECK:STDOUT: %.loc10_23.20: ref %initializer_list = value_as_ref %.loc10_23.19
  274. // CHECK:STDOUT: %addr.loc10: %ptr.82f = addr_of %.loc10_23.20
  275. // CHECK:STDOUT: %Consume__carbon_thunk.call: init %empty_tuple.type = call imports.%Consume__carbon_thunk.decl(%addr.loc10)
  276. // CHECK:STDOUT: name_binding_decl {
  277. // CHECK:STDOUT: %_.patt.loc12: %pattern_type.92d = value_binding_pattern _ [concrete]
  278. // CHECK:STDOUT: }
  279. // CHECK:STDOUT: %int_1.loc12_37: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
  280. // CHECK:STDOUT: %int_2.loc12_40: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc]
  281. // CHECK:STDOUT: %int_3.loc12_43: Core.IntLiteral = int_value 3 [concrete = constants.%int_3.1ba]
  282. // CHECK:STDOUT: %.loc12_44.1: %tuple.type = tuple_literal (%int_1.loc12_37, %int_2.loc12_40, %int_3.loc12_43) [concrete = constants.%tuple]
  283. // CHECK:STDOUT: %.loc12_13: type = splice_block %InitListConstructor.ref [concrete = constants.%InitListConstructor] {
  284. // CHECK:STDOUT: %Cpp.ref.loc12: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  285. // CHECK:STDOUT: %InitListConstructor.ref: type = name_ref InitListConstructor, imports.%InitListConstructor.decl [concrete = constants.%InitListConstructor]
  286. // CHECK:STDOUT: }
  287. // CHECK:STDOUT: %.loc12_44.2: ref %InitListConstructor = temporary_storage
  288. // CHECK:STDOUT: <elided>
  289. // CHECK:STDOUT: %int_3.loc12_44: Core.IntLiteral = int_value 3 [concrete = constants.%int_3.1ba]
  290. // CHECK:STDOUT: %array_type.loc12: type = array_type %int_3.loc12_44, %i32.6 [concrete = constants.%array_type]
  291. // CHECK:STDOUT: %.loc12_44.3: ref %initializer_list = temporary_storage
  292. // CHECK:STDOUT: %impl.elem0.loc12_44.1: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5]
  293. // CHECK:STDOUT: %bound_method.loc12_44.1: <bound method> = bound_method %int_1.loc12_37, %impl.elem0.loc12_44.1 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.215]
  294. // CHECK:STDOUT: %specific_fn.loc12_44.1: <specific function> = specific_function %impl.elem0.loc12_44.1, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
  295. // CHECK:STDOUT: %bound_method.loc12_44.2: <bound method> = bound_method %int_1.loc12_37, %specific_fn.loc12_44.1 [concrete = constants.%bound_method.38b]
  296. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc12_44.1: init %i32 = call %bound_method.loc12_44.2(%int_1.loc12_37) [concrete = constants.%int_1.5d2]
  297. // CHECK:STDOUT: %.loc12_44.4: init %i32 = converted %int_1.loc12_37, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc12_44.1 [concrete = constants.%int_1.5d2]
  298. // CHECK:STDOUT: %.loc12_44.5: ref %array_type = temporary_storage
  299. // CHECK:STDOUT: %int_0.loc12: Core.IntLiteral = int_value 0 [concrete = constants.%int_0]
  300. // CHECK:STDOUT: %.loc12_44.6: ref %i32 = array_index %.loc12_44.5, %int_0.loc12
  301. // CHECK:STDOUT: %.loc12_44.7: init %i32 to %.loc12_44.6 = in_place_init %.loc12_44.4 [concrete = constants.%int_1.5d2]
  302. // CHECK:STDOUT: %impl.elem0.loc12_44.2: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5]
  303. // CHECK:STDOUT: %bound_method.loc12_44.3: <bound method> = bound_method %int_2.loc12_40, %impl.elem0.loc12_44.2 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.4e5]
  304. // CHECK:STDOUT: %specific_fn.loc12_44.2: <specific function> = specific_function %impl.elem0.loc12_44.2, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
  305. // CHECK:STDOUT: %bound_method.loc12_44.4: <bound method> = bound_method %int_2.loc12_40, %specific_fn.loc12_44.2 [concrete = constants.%bound_method.646]
  306. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc12_44.2: init %i32 = call %bound_method.loc12_44.4(%int_2.loc12_40) [concrete = constants.%int_2.ef8]
  307. // CHECK:STDOUT: %.loc12_44.8: init %i32 = converted %int_2.loc12_40, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc12_44.2 [concrete = constants.%int_2.ef8]
  308. // CHECK:STDOUT: %int_1.loc12_44: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
  309. // CHECK:STDOUT: %.loc12_44.9: ref %i32 = array_index %.loc12_44.5, %int_1.loc12_44
  310. // CHECK:STDOUT: %.loc12_44.10: init %i32 to %.loc12_44.9 = in_place_init %.loc12_44.8 [concrete = constants.%int_2.ef8]
  311. // CHECK:STDOUT: %impl.elem0.loc12_44.3: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5]
  312. // CHECK:STDOUT: %bound_method.loc12_44.5: <bound method> = bound_method %int_3.loc12_43, %impl.elem0.loc12_44.3 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.061]
  313. // CHECK:STDOUT: %specific_fn.loc12_44.3: <specific function> = specific_function %impl.elem0.loc12_44.3, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
  314. // CHECK:STDOUT: %bound_method.loc12_44.6: <bound method> = bound_method %int_3.loc12_43, %specific_fn.loc12_44.3 [concrete = constants.%bound_method.fa7]
  315. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc12_44.3: init %i32 = call %bound_method.loc12_44.6(%int_3.loc12_43) [concrete = constants.%int_3.822]
  316. // CHECK:STDOUT: %.loc12_44.11: init %i32 = converted %int_3.loc12_43, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc12_44.3 [concrete = constants.%int_3.822]
  317. // CHECK:STDOUT: %int_2.loc12_44: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc]
  318. // CHECK:STDOUT: %.loc12_44.12: ref %i32 = array_index %.loc12_44.5, %int_2.loc12_44
  319. // CHECK:STDOUT: %.loc12_44.13: init %i32 to %.loc12_44.12 = in_place_init %.loc12_44.11 [concrete = constants.%int_3.822]
  320. // CHECK:STDOUT: %.loc12_44.14: init %array_type to %.loc12_44.5 = array_init (%.loc12_44.7, %.loc12_44.10, %.loc12_44.13) [concrete = constants.%array]
  321. // CHECK:STDOUT: %.loc12_44.15: init %array_type = converted %.loc12_44.1, %.loc12_44.14 [concrete = constants.%array]
  322. // CHECK:STDOUT: %.loc12_44.16: ref %array_type = temporary %.loc12_44.5, %.loc12_44.15
  323. // CHECK:STDOUT: %.loc12_44.17: %array_type = acquire_value %.loc12_44.16
  324. // CHECK:STDOUT: %initializer_list.initializer_list.call.loc12: init %initializer_list to %.loc12_44.3 = call generated.%initializer_list.initializer_list.decl.2bdc3e.3(%.loc12_44.17)
  325. // CHECK:STDOUT: %.loc12_44.18: init %initializer_list = converted %.loc12_44.1, %initializer_list.initializer_list.call.loc12
  326. // CHECK:STDOUT: %.loc12_44.19: ref %initializer_list = temporary %.loc12_44.3, %.loc12_44.18
  327. // CHECK:STDOUT: %.loc12_44.20: %initializer_list = acquire_value %.loc12_44.19
  328. // CHECK:STDOUT: %.loc12_44.21: ref %initializer_list = value_as_ref %.loc12_44.20
  329. // CHECK:STDOUT: %addr.loc12_44.1: %ptr.82f = addr_of %.loc12_44.21
  330. // CHECK:STDOUT: %addr.loc12_44.2: %ptr.79d = addr_of %.loc12_44.2
  331. // CHECK:STDOUT: %InitListConstructor__carbon_thunk.call: init %empty_tuple.type = call imports.%InitListConstructor__carbon_thunk.decl(%addr.loc12_44.1, %addr.loc12_44.2)
  332. // CHECK:STDOUT: %.loc12_44.22: init %InitListConstructor to %.loc12_44.2 = mark_in_place_init %InitListConstructor__carbon_thunk.call
  333. // CHECK:STDOUT: %.loc12_44.23: init %InitListConstructor = converted %.loc12_44.1, %.loc12_44.22
  334. // CHECK:STDOUT: %.loc12_44.24: ref %InitListConstructor = temporary %.loc12_44.2, %.loc12_44.23
  335. // CHECK:STDOUT: %.loc12_44.25: %InitListConstructor = acquire_value %.loc12_44.24
  336. // CHECK:STDOUT: %_.loc12: %InitListConstructor = value_binding _, %.loc12_44.25
  337. // CHECK:STDOUT: %InitListConstructor.cpp_destructor.bound: <bound method> = bound_method %.loc12_44.24, constants.%InitListConstructor.cpp_destructor
  338. // CHECK:STDOUT: %InitListConstructor.cpp_destructor.call: init %empty_tuple.type = call %InitListConstructor.cpp_destructor.bound(%.loc12_44.24)
  339. // CHECK:STDOUT: %initializer_list.cpp_destructor.bound.loc12: <bound method> = bound_method %.loc12_44.19, constants.%initializer_list.cpp_destructor
  340. // CHECK:STDOUT: %initializer_list.cpp_destructor.call.loc12: init %empty_tuple.type = call %initializer_list.cpp_destructor.bound.loc12(%.loc12_44.19)
  341. // CHECK:STDOUT: %Destroy.Op.bound.loc12: <bound method> = bound_method %.loc12_44.16, constants.%Destroy.Op.651ba6.2
  342. // CHECK:STDOUT: %Destroy.Op.call.loc12: init %empty_tuple.type = call %Destroy.Op.bound.loc12(%.loc12_44.16)
  343. // CHECK:STDOUT: %initializer_list.cpp_destructor.bound.loc10: <bound method> = bound_method %.loc10_23.18, constants.%initializer_list.cpp_destructor
  344. // CHECK:STDOUT: %initializer_list.cpp_destructor.call.loc10: init %empty_tuple.type = call %initializer_list.cpp_destructor.bound.loc10(%.loc10_23.18)
  345. // CHECK:STDOUT: %Destroy.Op.bound.loc10: <bound method> = bound_method %.loc10_23.15, constants.%Destroy.Op.651ba6.2
  346. // CHECK:STDOUT: %Destroy.Op.call.loc10: init %empty_tuple.type = call %Destroy.Op.bound.loc10(%.loc10_23.15)
  347. // CHECK:STDOUT: %initializer_list.cpp_destructor.bound.loc8: <bound method> = bound_method %.loc8_50.18, constants.%initializer_list.cpp_destructor
  348. // CHECK:STDOUT: %initializer_list.cpp_destructor.call.loc8: init %empty_tuple.type = call %initializer_list.cpp_destructor.bound.loc8(%.loc8_50.18)
  349. // CHECK:STDOUT: %Destroy.Op.bound.loc8: <bound method> = bound_method %.loc8_50.15, constants.%Destroy.Op.651ba6.2
  350. // CHECK:STDOUT: %Destroy.Op.call.loc8: init %empty_tuple.type = call %Destroy.Op.bound.loc8(%.loc8_50.15)
  351. // CHECK:STDOUT: return
  352. // CHECK:STDOUT: }
  353. // CHECK:STDOUT:
  354. // CHECK:STDOUT: fn @initializer_list.initializer_list.loc8(%_.param: %array_type) -> out %return.param: %initializer_list = "cpp.std.initializer_list.make";
  355. // CHECK:STDOUT:
  356. // CHECK:STDOUT: fn @initializer_list.initializer_list.loc10(%_.param: %array_type) -> out %return.param: %initializer_list = "cpp.std.initializer_list.make";
  357. // CHECK:STDOUT:
  358. // CHECK:STDOUT: fn @initializer_list.initializer_list.loc12(%_.param: %array_type) -> out %return.param: %initializer_list = "cpp.std.initializer_list.make";
  359. // CHECK:STDOUT:
  360. // CHECK:STDOUT: fn @Destroy.Op.loc12(%self.param: ref %array_type) = "no_op";
  361. // CHECK:STDOUT: