default_arg.carbon 85 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890
  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/int.carbon
  6. // EXTRA-ARGS: --clang-arg=--std=c++23
  7. //
  8. // AUTOUPDATE
  9. // TIP: To test this file alone, run:
  10. // TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/check/testdata/interop/cpp/function/default_arg.carbon
  11. // TIP: To dump output, run:
  12. // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/interop/cpp/function/default_arg.carbon
  13. // --- functions.h
  14. auto GlobalNoReturn(int a, int b, int c = 1, int d = 2) -> void;
  15. auto GlobalReturnInt(int a, int b, int c = 1, int d = 2) -> int;
  16. struct X {
  17. void B(int a, int b = 1);
  18. static void C(int a, int b = 1);
  19. void D(this X, int a, int b = 1);
  20. };
  21. // --- call_without_default.carbon
  22. library "[[@TEST_NAME]]";
  23. import Cpp library "functions.h";
  24. fn Call() {
  25. //@dump-sem-ir-begin
  26. Cpp.GlobalNoReturn(1, 2, 3, 4);
  27. let unused value: i32 = Cpp.GlobalReturnInt(1, 2, 3, 4);
  28. ({} as Cpp.X).B(1, 2);
  29. Cpp.X.C(1, 2);
  30. ({} as Cpp.X).D(1, 2);
  31. //@dump-sem-ir-end
  32. }
  33. // --- call_with_default.carbon
  34. //@include-in-dumps
  35. library "[[@TEST_NAME]]";
  36. import Cpp library "functions.h";
  37. fn Call() {
  38. // //@dump-sem-ir-begin
  39. Cpp.GlobalNoReturn(1, 2);
  40. let unused value: i32 = Cpp.GlobalReturnInt(1, 2);
  41. Cpp.GlobalNoReturn(1, 2, 3);
  42. ({} as Cpp.X).B(1);
  43. Cpp.X.C(1);
  44. ({} as Cpp.X).D(1);
  45. // //@dump-sem-ir-end
  46. }
  47. // --- fail_call_too_few_args.carbon
  48. library "[[@TEST_NAME]]";
  49. import Cpp library "functions.h";
  50. fn Call() {
  51. //@dump-sem-ir-begin
  52. // CHECK:STDERR: fail_call_too_few_args.carbon:[[@LINE+8]]:23: error: no matching function for call to 'GlobalNoReturn' [CppInteropParseError]
  53. // CHECK:STDERR: 16 | Cpp.GlobalNoReturn(1);
  54. // CHECK:STDERR: | ^
  55. // CHECK:STDERR: fail_call_too_few_args.carbon:[[@LINE-7]]:10: in file included here [InCppInclude]
  56. // CHECK:STDERR: ./functions.h:2:6: note: candidate function not viable: requires at least 2 arguments, but 1 was provided [CppInteropParseNote]
  57. // CHECK:STDERR: 2 | auto GlobalNoReturn(int a, int b, int c = 1, int d = 2) -> void;
  58. // CHECK:STDERR: | ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  59. // CHECK:STDERR:
  60. Cpp.GlobalNoReturn(1);
  61. // CHECK:STDERR: fail_call_too_few_args.carbon:[[@LINE+8]]:22: error: no matching function for call to 'GlobalNoReturn' [CppInteropParseError]
  62. // CHECK:STDERR: 26 | Cpp.GlobalNoReturn();
  63. // CHECK:STDERR: | ^
  64. // CHECK:STDERR: fail_call_too_few_args.carbon:[[@LINE-17]]:10: in file included here [InCppInclude]
  65. // CHECK:STDERR: ./functions.h:2:6: note: candidate function not viable: requires at least 2 arguments, but 0 were provided [CppInteropParseNote]
  66. // CHECK:STDERR: 2 | auto GlobalNoReturn(int a, int b, int c = 1, int d = 2) -> void;
  67. // CHECK:STDERR: | ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  68. // CHECK:STDERR:
  69. Cpp.GlobalNoReturn();
  70. // CHECK:STDERR: fail_call_too_few_args.carbon:[[@LINE+8]]:24: error: no matching function for call to 'GlobalReturnInt' [CppInteropParseError]
  71. // CHECK:STDERR: 36 | Cpp.GlobalReturnInt(1);
  72. // CHECK:STDERR: | ^
  73. // CHECK:STDERR: fail_call_too_few_args.carbon:[[@LINE-27]]:10: in file included here [InCppInclude]
  74. // CHECK:STDERR: ./functions.h:3:6: note: candidate function not viable: requires at least 2 arguments, but 1 was provided [CppInteropParseNote]
  75. // CHECK:STDERR: 3 | auto GlobalReturnInt(int a, int b, int c = 1, int d = 2) -> int;
  76. // CHECK:STDERR: | ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  77. // CHECK:STDERR:
  78. Cpp.GlobalReturnInt(1);
  79. // CHECK:STDERR: fail_call_too_few_args.carbon:[[@LINE+8]]:23: error: no matching function for call to 'GlobalReturnInt' [CppInteropParseError]
  80. // CHECK:STDERR: 46 | Cpp.GlobalReturnInt();
  81. // CHECK:STDERR: | ^
  82. // CHECK:STDERR: fail_call_too_few_args.carbon:[[@LINE-37]]:10: in file included here [InCppInclude]
  83. // CHECK:STDERR: ./functions.h:3:6: note: candidate function not viable: requires at least 2 arguments, but 0 were provided [CppInteropParseNote]
  84. // CHECK:STDERR: 3 | auto GlobalReturnInt(int a, int b, int c = 1, int d = 2) -> int;
  85. // CHECK:STDERR: | ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  86. // CHECK:STDERR:
  87. Cpp.GlobalReturnInt();
  88. // CHECK:STDERR: fail_call_too_few_args.carbon:[[@LINE+8]]:19: error: no matching function for call to 'B' [CppInteropParseError]
  89. // CHECK:STDERR: 56 | ({} as Cpp.X).B();
  90. // CHECK:STDERR: | ^
  91. // CHECK:STDERR: fail_call_too_few_args.carbon:[[@LINE-47]]:10: in file included here [InCppInclude]
  92. // CHECK:STDERR: ./functions.h:6:8: note: candidate function not viable: requires at least argument 'a', but no arguments were provided [CppInteropParseNote]
  93. // CHECK:STDERR: 6 | void B(int a, int b = 1);
  94. // CHECK:STDERR: | ^ ~~~~~~~~~~~~~~~~
  95. // CHECK:STDERR:
  96. ({} as Cpp.X).B();
  97. // CHECK:STDERR: fail_call_too_few_args.carbon:[[@LINE+8]]:11: error: no matching function for call to 'C' [CppInteropParseError]
  98. // CHECK:STDERR: 66 | Cpp.X.C();
  99. // CHECK:STDERR: | ^
  100. // CHECK:STDERR: fail_call_too_few_args.carbon:[[@LINE-57]]:10: in file included here [InCppInclude]
  101. // CHECK:STDERR: ./functions.h:7:15: note: candidate function not viable: requires at least argument 'a', but no arguments were provided [CppInteropParseNote]
  102. // CHECK:STDERR: 7 | static void C(int a, int b = 1);
  103. // CHECK:STDERR: | ^ ~~~~~~~~~~~~~~~~
  104. // CHECK:STDERR:
  105. Cpp.X.C();
  106. // CHECK:STDERR: fail_call_too_few_args.carbon:[[@LINE+8]]:19: error: no matching function for call to 'D' [CppInteropParseError]
  107. // CHECK:STDERR: 76 | ({} as Cpp.X).D();
  108. // CHECK:STDERR: | ^
  109. // CHECK:STDERR: fail_call_too_few_args.carbon:[[@LINE-67]]:10: in file included here [InCppInclude]
  110. // CHECK:STDERR: ./functions.h:8:8: note: candidate function not viable: requires at least non-object argument 'a', but no arguments were provided [CppInteropParseNote]
  111. // CHECK:STDERR: 8 | void D(this X, int a, int b = 1);
  112. // CHECK:STDERR: | ^ ~~~~~~~~~~~~~~~~~~~~~~~~
  113. // CHECK:STDERR:
  114. ({} as Cpp.X).D();
  115. //@dump-sem-ir-end
  116. }
  117. // CHECK:STDOUT: --- call_without_default.carbon
  118. // CHECK:STDOUT:
  119. // CHECK:STDOUT: constants {
  120. // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
  121. // CHECK:STDOUT: %GlobalNoReturn.cpp_overload_set.type: type = cpp_overload_set_type @GlobalNoReturn.cpp_overload_set [concrete]
  122. // CHECK:STDOUT: %GlobalNoReturn.cpp_overload_set.value: %GlobalNoReturn.cpp_overload_set.type = cpp_overload_set_value @GlobalNoReturn.cpp_overload_set [concrete]
  123. // CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete]
  124. // CHECK:STDOUT: %int_2.ecc: Core.IntLiteral = int_value 2 [concrete]
  125. // CHECK:STDOUT: %int_3.1ba: Core.IntLiteral = int_value 3 [concrete]
  126. // CHECK:STDOUT: %int_4.0c1: Core.IntLiteral = int_value 4 [concrete]
  127. // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete]
  128. // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete]
  129. // CHECK:STDOUT: %pattern_type.7ce: type = pattern_type %i32 [concrete]
  130. // CHECK:STDOUT: %GlobalNoReturn.type: type = fn_type @GlobalNoReturn [concrete]
  131. // CHECK:STDOUT: %GlobalNoReturn: %GlobalNoReturn.type = struct_value () [concrete]
  132. // CHECK:STDOUT: %ImplicitAs.type.e8c: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete]
  133. // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic]
  134. // 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]
  135. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic]
  136. // CHECK:STDOUT: %ImplicitAs.impl_witness.6bc: <witness> = impl_witness imports.%ImplicitAs.impl_witness_table.74f, @Core.IntLiteral.as.ImplicitAs.impl(%int_32) [concrete]
  137. // 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]
  138. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete]
  139. // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete]
  140. // CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet) [concrete]
  141. // CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet [concrete]
  142. // 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]
  143. // 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]
  144. // CHECK:STDOUT: %bound_method.38b: <bound method> = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete]
  145. // CHECK:STDOUT: %int_1.5d2: %i32 = int_value 1 [concrete]
  146. // 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]
  147. // CHECK:STDOUT: %bound_method.646: <bound method> = bound_method %int_2.ecc, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete]
  148. // CHECK:STDOUT: %int_2.ef8: %i32 = int_value 2 [concrete]
  149. // 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]
  150. // CHECK:STDOUT: %bound_method.fa7: <bound method> = bound_method %int_3.1ba, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete]
  151. // CHECK:STDOUT: %int_3.822: %i32 = int_value 3 [concrete]
  152. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.f0c: <bound method> = bound_method %int_4.0c1, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete]
  153. // CHECK:STDOUT: %bound_method.6d7: <bound method> = bound_method %int_4.0c1, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete]
  154. // CHECK:STDOUT: %int_4.940: %i32 = int_value 4 [concrete]
  155. // CHECK:STDOUT: %GlobalReturnInt.cpp_overload_set.type: type = cpp_overload_set_type @GlobalReturnInt.cpp_overload_set [concrete]
  156. // CHECK:STDOUT: %GlobalReturnInt.cpp_overload_set.value: %GlobalReturnInt.cpp_overload_set.type = cpp_overload_set_value @GlobalReturnInt.cpp_overload_set [concrete]
  157. // CHECK:STDOUT: %GlobalReturnInt.type: type = fn_type @GlobalReturnInt [concrete]
  158. // CHECK:STDOUT: %GlobalReturnInt: %GlobalReturnInt.type = struct_value () [concrete]
  159. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
  160. // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete]
  161. // CHECK:STDOUT: %X: type = class_type @X [concrete]
  162. // CHECK:STDOUT: %X.val: %X = struct_value () [concrete]
  163. // CHECK:STDOUT: %X.B.cpp_overload_set.type: type = cpp_overload_set_type @X.B.cpp_overload_set [concrete]
  164. // CHECK:STDOUT: %X.B.cpp_overload_set.value: %X.B.cpp_overload_set.type = cpp_overload_set_value @X.B.cpp_overload_set [concrete]
  165. // CHECK:STDOUT: %pattern_type.46b: type = pattern_type %X [concrete]
  166. // CHECK:STDOUT: %X.B.type: type = fn_type @X.B [concrete]
  167. // CHECK:STDOUT: %X.B: %X.B.type = struct_value () [concrete]
  168. // CHECK:STDOUT: %X.C.cpp_overload_set.type: type = cpp_overload_set_type @X.C.cpp_overload_set [concrete]
  169. // CHECK:STDOUT: %X.C.cpp_overload_set.value: %X.C.cpp_overload_set.type = cpp_overload_set_value @X.C.cpp_overload_set [concrete]
  170. // CHECK:STDOUT: %X.C.type: type = fn_type @X.C [concrete]
  171. // CHECK:STDOUT: %X.C: %X.C.type = struct_value () [concrete]
  172. // CHECK:STDOUT: %X.D.cpp_overload_set.type: type = cpp_overload_set_type @X.D.cpp_overload_set [concrete]
  173. // CHECK:STDOUT: %X.D.cpp_overload_set.value: %X.D.cpp_overload_set.type = cpp_overload_set_value @X.D.cpp_overload_set [concrete]
  174. // CHECK:STDOUT: %ptr.1f9: type = ptr_type %X [concrete]
  175. // CHECK:STDOUT: %D__carbon_thunk.type: type = fn_type @D__carbon_thunk [concrete]
  176. // CHECK:STDOUT: %D__carbon_thunk: %D__carbon_thunk.type = struct_value () [concrete]
  177. // CHECK:STDOUT: %X.cpp_destructor.type: type = fn_type @X.cpp_destructor [concrete]
  178. // CHECK:STDOUT: %X.cpp_destructor: %X.cpp_destructor.type = struct_value () [concrete]
  179. // CHECK:STDOUT: }
  180. // CHECK:STDOUT:
  181. // CHECK:STDOUT: imports {
  182. // CHECK:STDOUT: %Cpp: <namespace> = namespace file.%Cpp.import_cpp, [concrete] {
  183. // CHECK:STDOUT: .GlobalNoReturn = %GlobalNoReturn.cpp_overload_set.value
  184. // CHECK:STDOUT: .GlobalReturnInt = %GlobalReturnInt.cpp_overload_set.value
  185. // CHECK:STDOUT: .X = %X.decl
  186. // CHECK:STDOUT: import Cpp//...
  187. // CHECK:STDOUT: }
  188. // CHECK:STDOUT: %GlobalNoReturn.cpp_overload_set.value: %GlobalNoReturn.cpp_overload_set.type = cpp_overload_set_value @GlobalNoReturn.cpp_overload_set [concrete = constants.%GlobalNoReturn.cpp_overload_set.value]
  189. // CHECK:STDOUT: %GlobalNoReturn.decl: %GlobalNoReturn.type = fn_decl @GlobalNoReturn [concrete = constants.%GlobalNoReturn] {
  190. // CHECK:STDOUT: <elided>
  191. // CHECK:STDOUT: } {
  192. // CHECK:STDOUT: <elided>
  193. // CHECK:STDOUT: }
  194. // 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/parts/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)]
  195. // CHECK:STDOUT: %ImplicitAs.impl_witness_table.74f = impl_witness_table (%Core.import_ref.42d), @Core.IntLiteral.as.ImplicitAs.impl [concrete]
  196. // CHECK:STDOUT: %GlobalReturnInt.cpp_overload_set.value: %GlobalReturnInt.cpp_overload_set.type = cpp_overload_set_value @GlobalReturnInt.cpp_overload_set [concrete = constants.%GlobalReturnInt.cpp_overload_set.value]
  197. // CHECK:STDOUT: %GlobalReturnInt.decl: %GlobalReturnInt.type = fn_decl @GlobalReturnInt [concrete = constants.%GlobalReturnInt] {
  198. // CHECK:STDOUT: <elided>
  199. // CHECK:STDOUT: } {
  200. // CHECK:STDOUT: <elided>
  201. // CHECK:STDOUT: }
  202. // CHECK:STDOUT: %X.decl: type = class_decl @X [concrete = constants.%X] {} {}
  203. // CHECK:STDOUT: %X.B.cpp_overload_set.value: %X.B.cpp_overload_set.type = cpp_overload_set_value @X.B.cpp_overload_set [concrete = constants.%X.B.cpp_overload_set.value]
  204. // CHECK:STDOUT: %X.B.decl: %X.B.type = fn_decl @X.B [concrete = constants.%X.B] {
  205. // CHECK:STDOUT: %self.patt: %pattern_type.46b = ref_binding_pattern self [concrete]
  206. // CHECK:STDOUT: %self.param_patt: %pattern_type.46b = ref_param_pattern %self.patt, call_param0 [concrete]
  207. // CHECK:STDOUT: <elided>
  208. // CHECK:STDOUT: } {
  209. // CHECK:STDOUT: %self.param: ref %X = ref_param call_param0
  210. // CHECK:STDOUT: %self: ref %X = ref_binding self, %self.param
  211. // CHECK:STDOUT: <elided>
  212. // CHECK:STDOUT: }
  213. // CHECK:STDOUT: %X.C.cpp_overload_set.value: %X.C.cpp_overload_set.type = cpp_overload_set_value @X.C.cpp_overload_set [concrete = constants.%X.C.cpp_overload_set.value]
  214. // CHECK:STDOUT: %X.C.decl: %X.C.type = fn_decl @X.C [concrete = constants.%X.C] {
  215. // CHECK:STDOUT: <elided>
  216. // CHECK:STDOUT: } {
  217. // CHECK:STDOUT: <elided>
  218. // CHECK:STDOUT: }
  219. // CHECK:STDOUT: %X.D.cpp_overload_set.value: %X.D.cpp_overload_set.type = cpp_overload_set_value @X.D.cpp_overload_set [concrete = constants.%X.D.cpp_overload_set.value]
  220. // CHECK:STDOUT: %D__carbon_thunk.decl: %D__carbon_thunk.type = fn_decl @D__carbon_thunk [concrete = constants.%D__carbon_thunk] {
  221. // CHECK:STDOUT: <elided>
  222. // CHECK:STDOUT: } {
  223. // CHECK:STDOUT: <elided>
  224. // CHECK:STDOUT: }
  225. // CHECK:STDOUT: }
  226. // CHECK:STDOUT:
  227. // CHECK:STDOUT: fn @Call() {
  228. // CHECK:STDOUT: !entry:
  229. // CHECK:STDOUT: %Cpp.ref.loc8: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  230. // CHECK:STDOUT: %GlobalNoReturn.ref: %GlobalNoReturn.cpp_overload_set.type = name_ref GlobalNoReturn, imports.%GlobalNoReturn.cpp_overload_set.value [concrete = constants.%GlobalNoReturn.cpp_overload_set.value]
  231. // CHECK:STDOUT: %int_1.loc8: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
  232. // CHECK:STDOUT: %int_2.loc8: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc]
  233. // CHECK:STDOUT: %int_3.loc8: Core.IntLiteral = int_value 3 [concrete = constants.%int_3.1ba]
  234. // CHECK:STDOUT: %int_4.loc8: Core.IntLiteral = int_value 4 [concrete = constants.%int_4.0c1]
  235. // CHECK:STDOUT: %impl.elem0.loc8_22: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5]
  236. // CHECK:STDOUT: %bound_method.loc8_22.1: <bound method> = bound_method %int_1.loc8, %impl.elem0.loc8_22 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.215]
  237. // CHECK:STDOUT: %specific_fn.loc8_22: <specific function> = specific_function %impl.elem0.loc8_22, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
  238. // CHECK:STDOUT: %bound_method.loc8_22.2: <bound method> = bound_method %int_1.loc8, %specific_fn.loc8_22 [concrete = constants.%bound_method.38b]
  239. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc8_22: init %i32 = call %bound_method.loc8_22.2(%int_1.loc8) [concrete = constants.%int_1.5d2]
  240. // CHECK:STDOUT: %.loc8_22.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc8_22 [concrete = constants.%int_1.5d2]
  241. // CHECK:STDOUT: %.loc8_22.2: %i32 = converted %int_1.loc8, %.loc8_22.1 [concrete = constants.%int_1.5d2]
  242. // CHECK:STDOUT: %impl.elem0.loc8_25: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5]
  243. // CHECK:STDOUT: %bound_method.loc8_25.1: <bound method> = bound_method %int_2.loc8, %impl.elem0.loc8_25 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.4e5]
  244. // CHECK:STDOUT: %specific_fn.loc8_25: <specific function> = specific_function %impl.elem0.loc8_25, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
  245. // CHECK:STDOUT: %bound_method.loc8_25.2: <bound method> = bound_method %int_2.loc8, %specific_fn.loc8_25 [concrete = constants.%bound_method.646]
  246. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc8_25: init %i32 = call %bound_method.loc8_25.2(%int_2.loc8) [concrete = constants.%int_2.ef8]
  247. // CHECK:STDOUT: %.loc8_25.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc8_25 [concrete = constants.%int_2.ef8]
  248. // CHECK:STDOUT: %.loc8_25.2: %i32 = converted %int_2.loc8, %.loc8_25.1 [concrete = constants.%int_2.ef8]
  249. // CHECK:STDOUT: %impl.elem0.loc8_28: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5]
  250. // CHECK:STDOUT: %bound_method.loc8_28.1: <bound method> = bound_method %int_3.loc8, %impl.elem0.loc8_28 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.061]
  251. // CHECK:STDOUT: %specific_fn.loc8_28: <specific function> = specific_function %impl.elem0.loc8_28, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
  252. // CHECK:STDOUT: %bound_method.loc8_28.2: <bound method> = bound_method %int_3.loc8, %specific_fn.loc8_28 [concrete = constants.%bound_method.fa7]
  253. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc8_28: init %i32 = call %bound_method.loc8_28.2(%int_3.loc8) [concrete = constants.%int_3.822]
  254. // CHECK:STDOUT: %.loc8_28.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc8_28 [concrete = constants.%int_3.822]
  255. // CHECK:STDOUT: %.loc8_28.2: %i32 = converted %int_3.loc8, %.loc8_28.1 [concrete = constants.%int_3.822]
  256. // CHECK:STDOUT: %impl.elem0.loc8_31: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5]
  257. // CHECK:STDOUT: %bound_method.loc8_31.1: <bound method> = bound_method %int_4.loc8, %impl.elem0.loc8_31 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.f0c]
  258. // CHECK:STDOUT: %specific_fn.loc8_31: <specific function> = specific_function %impl.elem0.loc8_31, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
  259. // CHECK:STDOUT: %bound_method.loc8_31.2: <bound method> = bound_method %int_4.loc8, %specific_fn.loc8_31 [concrete = constants.%bound_method.6d7]
  260. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc8_31: init %i32 = call %bound_method.loc8_31.2(%int_4.loc8) [concrete = constants.%int_4.940]
  261. // CHECK:STDOUT: %.loc8_31.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc8_31 [concrete = constants.%int_4.940]
  262. // CHECK:STDOUT: %.loc8_31.2: %i32 = converted %int_4.loc8, %.loc8_31.1 [concrete = constants.%int_4.940]
  263. // CHECK:STDOUT: %GlobalNoReturn.call: init %empty_tuple.type = call imports.%GlobalNoReturn.decl(%.loc8_22.2, %.loc8_25.2, %.loc8_28.2, %.loc8_31.2)
  264. // CHECK:STDOUT: name_binding_decl {
  265. // CHECK:STDOUT: %value.patt: %pattern_type.7ce = value_binding_pattern value [concrete]
  266. // CHECK:STDOUT: }
  267. // CHECK:STDOUT: %Cpp.ref.loc9: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  268. // CHECK:STDOUT: %GlobalReturnInt.ref: %GlobalReturnInt.cpp_overload_set.type = name_ref GlobalReturnInt, imports.%GlobalReturnInt.cpp_overload_set.value [concrete = constants.%GlobalReturnInt.cpp_overload_set.value]
  269. // CHECK:STDOUT: %int_1.loc9: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
  270. // CHECK:STDOUT: %int_2.loc9: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc]
  271. // CHECK:STDOUT: %int_3.loc9: Core.IntLiteral = int_value 3 [concrete = constants.%int_3.1ba]
  272. // CHECK:STDOUT: %int_4.loc9: Core.IntLiteral = int_value 4 [concrete = constants.%int_4.0c1]
  273. // CHECK:STDOUT: %impl.elem0.loc9_47: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5]
  274. // CHECK:STDOUT: %bound_method.loc9_47.1: <bound method> = bound_method %int_1.loc9, %impl.elem0.loc9_47 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.215]
  275. // CHECK:STDOUT: %specific_fn.loc9_47: <specific function> = specific_function %impl.elem0.loc9_47, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
  276. // CHECK:STDOUT: %bound_method.loc9_47.2: <bound method> = bound_method %int_1.loc9, %specific_fn.loc9_47 [concrete = constants.%bound_method.38b]
  277. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc9_47: init %i32 = call %bound_method.loc9_47.2(%int_1.loc9) [concrete = constants.%int_1.5d2]
  278. // CHECK:STDOUT: %.loc9_47.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc9_47 [concrete = constants.%int_1.5d2]
  279. // CHECK:STDOUT: %.loc9_47.2: %i32 = converted %int_1.loc9, %.loc9_47.1 [concrete = constants.%int_1.5d2]
  280. // CHECK:STDOUT: %impl.elem0.loc9_50: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5]
  281. // CHECK:STDOUT: %bound_method.loc9_50.1: <bound method> = bound_method %int_2.loc9, %impl.elem0.loc9_50 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.4e5]
  282. // CHECK:STDOUT: %specific_fn.loc9_50: <specific function> = specific_function %impl.elem0.loc9_50, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
  283. // CHECK:STDOUT: %bound_method.loc9_50.2: <bound method> = bound_method %int_2.loc9, %specific_fn.loc9_50 [concrete = constants.%bound_method.646]
  284. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc9_50: init %i32 = call %bound_method.loc9_50.2(%int_2.loc9) [concrete = constants.%int_2.ef8]
  285. // CHECK:STDOUT: %.loc9_50.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc9_50 [concrete = constants.%int_2.ef8]
  286. // CHECK:STDOUT: %.loc9_50.2: %i32 = converted %int_2.loc9, %.loc9_50.1 [concrete = constants.%int_2.ef8]
  287. // CHECK:STDOUT: %impl.elem0.loc9_53: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5]
  288. // CHECK:STDOUT: %bound_method.loc9_53.1: <bound method> = bound_method %int_3.loc9, %impl.elem0.loc9_53 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.061]
  289. // CHECK:STDOUT: %specific_fn.loc9_53: <specific function> = specific_function %impl.elem0.loc9_53, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
  290. // CHECK:STDOUT: %bound_method.loc9_53.2: <bound method> = bound_method %int_3.loc9, %specific_fn.loc9_53 [concrete = constants.%bound_method.fa7]
  291. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc9_53: init %i32 = call %bound_method.loc9_53.2(%int_3.loc9) [concrete = constants.%int_3.822]
  292. // CHECK:STDOUT: %.loc9_53.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc9_53 [concrete = constants.%int_3.822]
  293. // CHECK:STDOUT: %.loc9_53.2: %i32 = converted %int_3.loc9, %.loc9_53.1 [concrete = constants.%int_3.822]
  294. // CHECK:STDOUT: %impl.elem0.loc9_56: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5]
  295. // CHECK:STDOUT: %bound_method.loc9_56.1: <bound method> = bound_method %int_4.loc9, %impl.elem0.loc9_56 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.f0c]
  296. // CHECK:STDOUT: %specific_fn.loc9_56: <specific function> = specific_function %impl.elem0.loc9_56, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
  297. // CHECK:STDOUT: %bound_method.loc9_56.2: <bound method> = bound_method %int_4.loc9, %specific_fn.loc9_56 [concrete = constants.%bound_method.6d7]
  298. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc9_56: init %i32 = call %bound_method.loc9_56.2(%int_4.loc9) [concrete = constants.%int_4.940]
  299. // CHECK:STDOUT: %.loc9_56.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc9_56 [concrete = constants.%int_4.940]
  300. // CHECK:STDOUT: %.loc9_56.2: %i32 = converted %int_4.loc9, %.loc9_56.1 [concrete = constants.%int_4.940]
  301. // CHECK:STDOUT: %GlobalReturnInt.call: init %i32 = call imports.%GlobalReturnInt.decl(%.loc9_47.2, %.loc9_50.2, %.loc9_53.2, %.loc9_56.2)
  302. // CHECK:STDOUT: %i32: type = type_literal constants.%i32 [concrete = constants.%i32]
  303. // CHECK:STDOUT: %.loc9_57.1: %i32 = value_of_initializer %GlobalReturnInt.call
  304. // CHECK:STDOUT: %.loc9_57.2: %i32 = converted %GlobalReturnInt.call, %.loc9_57.1
  305. // CHECK:STDOUT: %value: %i32 = value_binding value, %.loc9_57.2
  306. // CHECK:STDOUT: %.loc10_5.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
  307. // CHECK:STDOUT: %Cpp.ref.loc10: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  308. // CHECK:STDOUT: %X.ref.loc10: type = name_ref X, imports.%X.decl [concrete = constants.%X]
  309. // CHECK:STDOUT: %.loc10_5.2: ref %X = temporary_storage
  310. // CHECK:STDOUT: %.loc10_5.3: init %X to %.loc10_5.2 = class_init () [concrete = constants.%X.val]
  311. // CHECK:STDOUT: %.loc10_5.4: ref %X = temporary %.loc10_5.2, %.loc10_5.3
  312. // CHECK:STDOUT: %.loc10_7: ref %X = converted %.loc10_5.1, %.loc10_5.4
  313. // CHECK:STDOUT: %B.ref: %X.B.cpp_overload_set.type = name_ref B, imports.%X.B.cpp_overload_set.value [concrete = constants.%X.B.cpp_overload_set.value]
  314. // CHECK:STDOUT: %bound_method.loc10_16: <bound method> = bound_method %.loc10_7, %B.ref
  315. // CHECK:STDOUT: %int_1.loc10: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
  316. // CHECK:STDOUT: %int_2.loc10: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc]
  317. // CHECK:STDOUT: %impl.elem0.loc10_19: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5]
  318. // CHECK:STDOUT: %bound_method.loc10_19.1: <bound method> = bound_method %int_1.loc10, %impl.elem0.loc10_19 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.215]
  319. // CHECK:STDOUT: %specific_fn.loc10_19: <specific function> = specific_function %impl.elem0.loc10_19, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
  320. // CHECK:STDOUT: %bound_method.loc10_19.2: <bound method> = bound_method %int_1.loc10, %specific_fn.loc10_19 [concrete = constants.%bound_method.38b]
  321. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc10_19: init %i32 = call %bound_method.loc10_19.2(%int_1.loc10) [concrete = constants.%int_1.5d2]
  322. // CHECK:STDOUT: %.loc10_19.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc10_19 [concrete = constants.%int_1.5d2]
  323. // CHECK:STDOUT: %.loc10_19.2: %i32 = converted %int_1.loc10, %.loc10_19.1 [concrete = constants.%int_1.5d2]
  324. // CHECK:STDOUT: %impl.elem0.loc10_22: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5]
  325. // CHECK:STDOUT: %bound_method.loc10_22.1: <bound method> = bound_method %int_2.loc10, %impl.elem0.loc10_22 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.4e5]
  326. // CHECK:STDOUT: %specific_fn.loc10_22: <specific function> = specific_function %impl.elem0.loc10_22, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
  327. // CHECK:STDOUT: %bound_method.loc10_22.2: <bound method> = bound_method %int_2.loc10, %specific_fn.loc10_22 [concrete = constants.%bound_method.646]
  328. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc10_22: init %i32 = call %bound_method.loc10_22.2(%int_2.loc10) [concrete = constants.%int_2.ef8]
  329. // CHECK:STDOUT: %.loc10_22.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc10_22 [concrete = constants.%int_2.ef8]
  330. // CHECK:STDOUT: %.loc10_22.2: %i32 = converted %int_2.loc10, %.loc10_22.1 [concrete = constants.%int_2.ef8]
  331. // CHECK:STDOUT: %X.B.call: init %empty_tuple.type = call imports.%X.B.decl(%.loc10_7, %.loc10_19.2, %.loc10_22.2)
  332. // CHECK:STDOUT: %Cpp.ref.loc11: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  333. // CHECK:STDOUT: %X.ref.loc11: type = name_ref X, imports.%X.decl [concrete = constants.%X]
  334. // CHECK:STDOUT: %C.ref: %X.C.cpp_overload_set.type = name_ref C, imports.%X.C.cpp_overload_set.value [concrete = constants.%X.C.cpp_overload_set.value]
  335. // CHECK:STDOUT: %int_1.loc11: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
  336. // CHECK:STDOUT: %int_2.loc11: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc]
  337. // CHECK:STDOUT: %impl.elem0.loc11_11: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5]
  338. // CHECK:STDOUT: %bound_method.loc11_11.1: <bound method> = bound_method %int_1.loc11, %impl.elem0.loc11_11 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.215]
  339. // CHECK:STDOUT: %specific_fn.loc11_11: <specific function> = specific_function %impl.elem0.loc11_11, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
  340. // CHECK:STDOUT: %bound_method.loc11_11.2: <bound method> = bound_method %int_1.loc11, %specific_fn.loc11_11 [concrete = constants.%bound_method.38b]
  341. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc11_11: init %i32 = call %bound_method.loc11_11.2(%int_1.loc11) [concrete = constants.%int_1.5d2]
  342. // CHECK:STDOUT: %.loc11_11.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc11_11 [concrete = constants.%int_1.5d2]
  343. // CHECK:STDOUT: %.loc11_11.2: %i32 = converted %int_1.loc11, %.loc11_11.1 [concrete = constants.%int_1.5d2]
  344. // CHECK:STDOUT: %impl.elem0.loc11_14: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5]
  345. // CHECK:STDOUT: %bound_method.loc11_14.1: <bound method> = bound_method %int_2.loc11, %impl.elem0.loc11_14 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.4e5]
  346. // CHECK:STDOUT: %specific_fn.loc11_14: <specific function> = specific_function %impl.elem0.loc11_14, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
  347. // CHECK:STDOUT: %bound_method.loc11_14.2: <bound method> = bound_method %int_2.loc11, %specific_fn.loc11_14 [concrete = constants.%bound_method.646]
  348. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc11_14: init %i32 = call %bound_method.loc11_14.2(%int_2.loc11) [concrete = constants.%int_2.ef8]
  349. // CHECK:STDOUT: %.loc11_14.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc11_14 [concrete = constants.%int_2.ef8]
  350. // CHECK:STDOUT: %.loc11_14.2: %i32 = converted %int_2.loc11, %.loc11_14.1 [concrete = constants.%int_2.ef8]
  351. // CHECK:STDOUT: %X.C.call: init %empty_tuple.type = call imports.%X.C.decl(%.loc11_11.2, %.loc11_14.2)
  352. // CHECK:STDOUT: %.loc12_5.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
  353. // CHECK:STDOUT: %Cpp.ref.loc12: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  354. // CHECK:STDOUT: %X.ref.loc12: type = name_ref X, imports.%X.decl [concrete = constants.%X]
  355. // CHECK:STDOUT: %.loc12_5.2: ref %X = temporary_storage
  356. // CHECK:STDOUT: %.loc12_5.3: init %X to %.loc12_5.2 = class_init () [concrete = constants.%X.val]
  357. // CHECK:STDOUT: %.loc12_5.4: ref %X = temporary %.loc12_5.2, %.loc12_5.3
  358. // CHECK:STDOUT: %.loc12_7.1: ref %X = converted %.loc12_5.1, %.loc12_5.4
  359. // CHECK:STDOUT: %D.ref: %X.D.cpp_overload_set.type = name_ref D, imports.%X.D.cpp_overload_set.value [concrete = constants.%X.D.cpp_overload_set.value]
  360. // CHECK:STDOUT: %bound_method.loc12_16: <bound method> = bound_method %.loc12_7.1, %D.ref
  361. // CHECK:STDOUT: %int_1.loc12: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
  362. // CHECK:STDOUT: %int_2.loc12: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc]
  363. // CHECK:STDOUT: %.loc12_7.2: %X = acquire_value %.loc12_7.1
  364. // CHECK:STDOUT: %impl.elem0.loc12_19: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5]
  365. // CHECK:STDOUT: %bound_method.loc12_19.1: <bound method> = bound_method %int_1.loc12, %impl.elem0.loc12_19 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.215]
  366. // CHECK:STDOUT: %specific_fn.loc12_19: <specific function> = specific_function %impl.elem0.loc12_19, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
  367. // CHECK:STDOUT: %bound_method.loc12_19.2: <bound method> = bound_method %int_1.loc12, %specific_fn.loc12_19 [concrete = constants.%bound_method.38b]
  368. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc12_19: init %i32 = call %bound_method.loc12_19.2(%int_1.loc12) [concrete = constants.%int_1.5d2]
  369. // CHECK:STDOUT: %.loc12_19.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc12_19 [concrete = constants.%int_1.5d2]
  370. // CHECK:STDOUT: %.loc12_19.2: %i32 = converted %int_1.loc12, %.loc12_19.1 [concrete = constants.%int_1.5d2]
  371. // CHECK:STDOUT: %impl.elem0.loc12_22: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5]
  372. // CHECK:STDOUT: %bound_method.loc12_22.1: <bound method> = bound_method %int_2.loc12, %impl.elem0.loc12_22 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.4e5]
  373. // CHECK:STDOUT: %specific_fn.loc12_22: <specific function> = specific_function %impl.elem0.loc12_22, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
  374. // CHECK:STDOUT: %bound_method.loc12_22.2: <bound method> = bound_method %int_2.loc12, %specific_fn.loc12_22 [concrete = constants.%bound_method.646]
  375. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc12_22: init %i32 = call %bound_method.loc12_22.2(%int_2.loc12) [concrete = constants.%int_2.ef8]
  376. // CHECK:STDOUT: %.loc12_22.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc12_22 [concrete = constants.%int_2.ef8]
  377. // CHECK:STDOUT: %.loc12_22.2: %i32 = converted %int_2.loc12, %.loc12_22.1 [concrete = constants.%int_2.ef8]
  378. // CHECK:STDOUT: %.loc12_7.3: ref %X = value_as_ref %.loc12_7.2
  379. // CHECK:STDOUT: %addr: %ptr.1f9 = addr_of %.loc12_7.3
  380. // CHECK:STDOUT: %D__carbon_thunk.call: init %empty_tuple.type = call imports.%D__carbon_thunk.decl(%addr, %.loc12_19.2, %.loc12_22.2)
  381. // CHECK:STDOUT: %X.cpp_destructor.bound.loc12: <bound method> = bound_method %.loc12_5.4, constants.%X.cpp_destructor
  382. // CHECK:STDOUT: %X.cpp_destructor.call.loc12: init %empty_tuple.type = call %X.cpp_destructor.bound.loc12(%.loc12_5.4)
  383. // CHECK:STDOUT: %X.cpp_destructor.bound.loc10: <bound method> = bound_method %.loc10_5.4, constants.%X.cpp_destructor
  384. // CHECK:STDOUT: %X.cpp_destructor.call.loc10: init %empty_tuple.type = call %X.cpp_destructor.bound.loc10(%.loc10_5.4)
  385. // CHECK:STDOUT: <elided>
  386. // CHECK:STDOUT: }
  387. // CHECK:STDOUT:
  388. // CHECK:STDOUT: --- call_with_default.carbon
  389. // CHECK:STDOUT:
  390. // CHECK:STDOUT: constants {
  391. // CHECK:STDOUT: %Call.type: type = fn_type @Call [concrete]
  392. // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
  393. // CHECK:STDOUT: %Call: %Call.type = struct_value () [concrete]
  394. // CHECK:STDOUT: %GlobalNoReturn.cpp_overload_set.type: type = cpp_overload_set_type @GlobalNoReturn.cpp_overload_set [concrete]
  395. // CHECK:STDOUT: %GlobalNoReturn.cpp_overload_set.value: %GlobalNoReturn.cpp_overload_set.type = cpp_overload_set_value @GlobalNoReturn.cpp_overload_set [concrete]
  396. // CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete]
  397. // CHECK:STDOUT: %int_2.ecc: Core.IntLiteral = int_value 2 [concrete]
  398. // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete]
  399. // CHECK:STDOUT: %Int.type: type = generic_class_type @Int [concrete]
  400. // CHECK:STDOUT: %Int.generic: %Int.type = struct_value () [concrete]
  401. // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete]
  402. // CHECK:STDOUT: %pattern_type.7ce: type = pattern_type %i32 [concrete]
  403. // CHECK:STDOUT: %GlobalNoReturn__carbon_thunk.type.f197cb.1: type = fn_type @GlobalNoReturn__carbon_thunk.1 [concrete]
  404. // CHECK:STDOUT: %GlobalNoReturn__carbon_thunk.ea1e66.1: %GlobalNoReturn__carbon_thunk.type.f197cb.1 = struct_value () [concrete]
  405. // CHECK:STDOUT: %ImplicitAs.type.cc7: type = generic_interface_type @ImplicitAs [concrete]
  406. // CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.cc7 = struct_value () [concrete]
  407. // CHECK:STDOUT: %ImplicitAs.type.e8c: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete]
  408. // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic]
  409. // 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]
  410. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic]
  411. // CHECK:STDOUT: %ImplicitAs.impl_witness.6bc: <witness> = impl_witness imports.%ImplicitAs.impl_witness_table.74f, @Core.IntLiteral.as.ImplicitAs.impl(%int_32) [concrete]
  412. // 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]
  413. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete]
  414. // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete]
  415. // CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet) [concrete]
  416. // CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet [concrete]
  417. // 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]
  418. // 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]
  419. // CHECK:STDOUT: %bound_method.38b: <bound method> = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete]
  420. // CHECK:STDOUT: %int_1.5d2: %i32 = int_value 1 [concrete]
  421. // 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]
  422. // CHECK:STDOUT: %bound_method.646: <bound method> = bound_method %int_2.ecc, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete]
  423. // CHECK:STDOUT: %int_2.ef8: %i32 = int_value 2 [concrete]
  424. // CHECK:STDOUT: %GlobalReturnInt.cpp_overload_set.type: type = cpp_overload_set_type @GlobalReturnInt.cpp_overload_set [concrete]
  425. // CHECK:STDOUT: %GlobalReturnInt.cpp_overload_set.value: %GlobalReturnInt.cpp_overload_set.type = cpp_overload_set_value @GlobalReturnInt.cpp_overload_set [concrete]
  426. // CHECK:STDOUT: %GlobalReturnInt__carbon_thunk.type: type = fn_type @GlobalReturnInt__carbon_thunk [concrete]
  427. // CHECK:STDOUT: %GlobalReturnInt__carbon_thunk: %GlobalReturnInt__carbon_thunk.type = struct_value () [concrete]
  428. // CHECK:STDOUT: %int_3.1ba: Core.IntLiteral = int_value 3 [concrete]
  429. // CHECK:STDOUT: %GlobalNoReturn__carbon_thunk.type.f197cb.2: type = fn_type @GlobalNoReturn__carbon_thunk.2 [concrete]
  430. // CHECK:STDOUT: %GlobalNoReturn__carbon_thunk.ea1e66.2: %GlobalNoReturn__carbon_thunk.type.f197cb.2 = struct_value () [concrete]
  431. // 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]
  432. // CHECK:STDOUT: %bound_method.fa7: <bound method> = bound_method %int_3.1ba, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete]
  433. // CHECK:STDOUT: %int_3.822: %i32 = int_value 3 [concrete]
  434. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
  435. // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete]
  436. // CHECK:STDOUT: %X: type = class_type @X [concrete]
  437. // CHECK:STDOUT: %complete_type.357: <witness> = complete_type_witness %empty_struct_type [concrete]
  438. // CHECK:STDOUT: %X.val: %X = struct_value () [concrete]
  439. // CHECK:STDOUT: %X.B.cpp_overload_set.type: type = cpp_overload_set_type @X.B.cpp_overload_set [concrete]
  440. // CHECK:STDOUT: %X.B.cpp_overload_set.value: %X.B.cpp_overload_set.type = cpp_overload_set_value @X.B.cpp_overload_set [concrete]
  441. // CHECK:STDOUT: %pattern_type.46b: type = pattern_type %X [concrete]
  442. // CHECK:STDOUT: %B__carbon_thunk.type: type = fn_type @B__carbon_thunk [concrete]
  443. // CHECK:STDOUT: %B__carbon_thunk: %B__carbon_thunk.type = struct_value () [concrete]
  444. // CHECK:STDOUT: %X.C.cpp_overload_set.type: type = cpp_overload_set_type @X.C.cpp_overload_set [concrete]
  445. // CHECK:STDOUT: %X.C.cpp_overload_set.value: %X.C.cpp_overload_set.type = cpp_overload_set_value @X.C.cpp_overload_set [concrete]
  446. // CHECK:STDOUT: %C__carbon_thunk.type: type = fn_type @C__carbon_thunk [concrete]
  447. // CHECK:STDOUT: %C__carbon_thunk: %C__carbon_thunk.type = struct_value () [concrete]
  448. // CHECK:STDOUT: %X.D.cpp_overload_set.type: type = cpp_overload_set_type @X.D.cpp_overload_set [concrete]
  449. // CHECK:STDOUT: %X.D.cpp_overload_set.value: %X.D.cpp_overload_set.type = cpp_overload_set_value @X.D.cpp_overload_set [concrete]
  450. // CHECK:STDOUT: %ptr.1f9: type = ptr_type %X [concrete]
  451. // CHECK:STDOUT: %pattern_type.45c: type = pattern_type %ptr.1f9 [concrete]
  452. // CHECK:STDOUT: %D__carbon_thunk.type: type = fn_type @D__carbon_thunk [concrete]
  453. // CHECK:STDOUT: %D__carbon_thunk: %D__carbon_thunk.type = struct_value () [concrete]
  454. // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete]
  455. // CHECK:STDOUT: %X.cpp_destructor.type: type = fn_type @X.cpp_destructor [concrete]
  456. // CHECK:STDOUT: %X.cpp_destructor: %X.cpp_destructor.type = struct_value () [concrete]
  457. // CHECK:STDOUT: }
  458. // CHECK:STDOUT:
  459. // CHECK:STDOUT: imports {
  460. // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
  461. // CHECK:STDOUT: .Int = %Core.Int
  462. // CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs
  463. // CHECK:STDOUT: .Destroy = %Core.Destroy
  464. // CHECK:STDOUT: import Core//prelude
  465. // CHECK:STDOUT: import Core//prelude/...
  466. // CHECK:STDOUT: }
  467. // CHECK:STDOUT: %Cpp: <namespace> = namespace file.%Cpp.import_cpp, [concrete] {
  468. // CHECK:STDOUT: .GlobalNoReturn = %GlobalNoReturn.cpp_overload_set.value
  469. // CHECK:STDOUT: .GlobalReturnInt = %GlobalReturnInt.cpp_overload_set.value
  470. // CHECK:STDOUT: .X = %X.decl
  471. // CHECK:STDOUT: import Cpp//...
  472. // CHECK:STDOUT: }
  473. // CHECK:STDOUT: %GlobalNoReturn.cpp_overload_set.value: %GlobalNoReturn.cpp_overload_set.type = cpp_overload_set_value @GlobalNoReturn.cpp_overload_set [concrete = constants.%GlobalNoReturn.cpp_overload_set.value]
  474. // CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic]
  475. // CHECK:STDOUT: %GlobalNoReturn__carbon_thunk.decl.305fd1.1: %GlobalNoReturn__carbon_thunk.type.f197cb.1 = fn_decl @GlobalNoReturn__carbon_thunk.1 [concrete = constants.%GlobalNoReturn__carbon_thunk.ea1e66.1] {
  476. // CHECK:STDOUT: %a.patt: %pattern_type.7ce = value_binding_pattern a [concrete]
  477. // CHECK:STDOUT: %a.param_patt: %pattern_type.7ce = value_param_pattern %a.patt, call_param0 [concrete]
  478. // CHECK:STDOUT: %b.patt: %pattern_type.7ce = value_binding_pattern b [concrete]
  479. // CHECK:STDOUT: %b.param_patt: %pattern_type.7ce = value_param_pattern %b.patt, call_param1 [concrete]
  480. // CHECK:STDOUT: } {
  481. // CHECK:STDOUT: %a.param: %i32 = value_param call_param0
  482. // CHECK:STDOUT: %.1: type = splice_block %i32.4 [concrete = constants.%i32] {
  483. // CHECK:STDOUT: %int_32.2: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  484. // CHECK:STDOUT: %i32.3: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
  485. // CHECK:STDOUT: %i32.4: type = type_literal %i32.3 [concrete = constants.%i32]
  486. // CHECK:STDOUT: }
  487. // CHECK:STDOUT: %a: %i32 = value_binding a, %a.param
  488. // CHECK:STDOUT: %b.param: %i32 = value_param call_param1
  489. // CHECK:STDOUT: %.2: type = splice_block %i32.2 [concrete = constants.%i32] {
  490. // CHECK:STDOUT: %int_32.1: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  491. // CHECK:STDOUT: %i32.1: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
  492. // CHECK:STDOUT: %i32.2: type = type_literal %i32.1 [concrete = constants.%i32]
  493. // CHECK:STDOUT: }
  494. // CHECK:STDOUT: %b: %i32 = value_binding b, %b.param
  495. // CHECK:STDOUT: }
  496. // CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/parts/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic]
  497. // 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/parts/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)]
  498. // CHECK:STDOUT: %ImplicitAs.impl_witness_table.74f = impl_witness_table (%Core.import_ref.42d), @Core.IntLiteral.as.ImplicitAs.impl [concrete]
  499. // CHECK:STDOUT: %GlobalReturnInt.cpp_overload_set.value: %GlobalReturnInt.cpp_overload_set.type = cpp_overload_set_value @GlobalReturnInt.cpp_overload_set [concrete = constants.%GlobalReturnInt.cpp_overload_set.value]
  500. // CHECK:STDOUT: %GlobalReturnInt__carbon_thunk.decl: %GlobalReturnInt__carbon_thunk.type = fn_decl @GlobalReturnInt__carbon_thunk [concrete = constants.%GlobalReturnInt__carbon_thunk] {
  501. // CHECK:STDOUT: %a.patt: %pattern_type.7ce = value_binding_pattern a [concrete]
  502. // CHECK:STDOUT: %a.param_patt: %pattern_type.7ce = value_param_pattern %a.patt, call_param0 [concrete]
  503. // CHECK:STDOUT: %b.patt: %pattern_type.7ce = value_binding_pattern b [concrete]
  504. // CHECK:STDOUT: %b.param_patt: %pattern_type.7ce = value_param_pattern %b.patt, call_param1 [concrete]
  505. // CHECK:STDOUT: %return.patt: %pattern_type.7ce = return_slot_pattern [concrete]
  506. // CHECK:STDOUT: %return.param_patt: %pattern_type.7ce = out_param_pattern %return.patt, call_param2 [concrete]
  507. // CHECK:STDOUT: } {
  508. // CHECK:STDOUT: %int_32.1: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  509. // CHECK:STDOUT: %i32.1: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
  510. // CHECK:STDOUT: %i32.2: type = type_literal %i32.1 [concrete = constants.%i32]
  511. // CHECK:STDOUT: %a.param: %i32 = value_param call_param0
  512. // CHECK:STDOUT: %.1: type = splice_block %i32.6 [concrete = constants.%i32] {
  513. // CHECK:STDOUT: %int_32.3: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  514. // CHECK:STDOUT: %i32.5: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
  515. // CHECK:STDOUT: %i32.6: type = type_literal %i32.5 [concrete = constants.%i32]
  516. // CHECK:STDOUT: }
  517. // CHECK:STDOUT: %a: %i32 = value_binding a, %a.param
  518. // CHECK:STDOUT: %b.param: %i32 = value_param call_param1
  519. // CHECK:STDOUT: %.2: type = splice_block %i32.4 [concrete = constants.%i32] {
  520. // CHECK:STDOUT: %int_32.2: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  521. // CHECK:STDOUT: %i32.3: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
  522. // CHECK:STDOUT: %i32.4: type = type_literal %i32.3 [concrete = constants.%i32]
  523. // CHECK:STDOUT: }
  524. // CHECK:STDOUT: %b: %i32 = value_binding b, %b.param
  525. // CHECK:STDOUT: %return.param: ref %i32 = out_param call_param2
  526. // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param
  527. // CHECK:STDOUT: }
  528. // CHECK:STDOUT: %GlobalNoReturn__carbon_thunk.decl.305fd1.2: %GlobalNoReturn__carbon_thunk.type.f197cb.2 = fn_decl @GlobalNoReturn__carbon_thunk.2 [concrete = constants.%GlobalNoReturn__carbon_thunk.ea1e66.2] {
  529. // CHECK:STDOUT: %a.patt: %pattern_type.7ce = value_binding_pattern a [concrete]
  530. // CHECK:STDOUT: %a.param_patt: %pattern_type.7ce = value_param_pattern %a.patt, call_param0 [concrete]
  531. // CHECK:STDOUT: %b.patt: %pattern_type.7ce = value_binding_pattern b [concrete]
  532. // CHECK:STDOUT: %b.param_patt: %pattern_type.7ce = value_param_pattern %b.patt, call_param1 [concrete]
  533. // CHECK:STDOUT: %c.patt: %pattern_type.7ce = value_binding_pattern c [concrete]
  534. // CHECK:STDOUT: %c.param_patt: %pattern_type.7ce = value_param_pattern %c.patt, call_param2 [concrete]
  535. // CHECK:STDOUT: } {
  536. // CHECK:STDOUT: %a.param: %i32 = value_param call_param0
  537. // CHECK:STDOUT: %.1: type = splice_block %i32.6 [concrete = constants.%i32] {
  538. // CHECK:STDOUT: %int_32.3: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  539. // CHECK:STDOUT: %i32.5: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
  540. // CHECK:STDOUT: %i32.6: type = type_literal %i32.5 [concrete = constants.%i32]
  541. // CHECK:STDOUT: }
  542. // CHECK:STDOUT: %a: %i32 = value_binding a, %a.param
  543. // CHECK:STDOUT: %b.param: %i32 = value_param call_param1
  544. // CHECK:STDOUT: %.2: type = splice_block %i32.4 [concrete = constants.%i32] {
  545. // CHECK:STDOUT: %int_32.2: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  546. // CHECK:STDOUT: %i32.3: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
  547. // CHECK:STDOUT: %i32.4: type = type_literal %i32.3 [concrete = constants.%i32]
  548. // CHECK:STDOUT: }
  549. // CHECK:STDOUT: %b: %i32 = value_binding b, %b.param
  550. // CHECK:STDOUT: %c.param: %i32 = value_param call_param2
  551. // CHECK:STDOUT: %.3: type = splice_block %i32.2 [concrete = constants.%i32] {
  552. // CHECK:STDOUT: %int_32.1: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  553. // CHECK:STDOUT: %i32.1: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
  554. // CHECK:STDOUT: %i32.2: type = type_literal %i32.1 [concrete = constants.%i32]
  555. // CHECK:STDOUT: }
  556. // CHECK:STDOUT: %c: %i32 = value_binding c, %c.param
  557. // CHECK:STDOUT: }
  558. // CHECK:STDOUT: %X.decl: type = class_decl @X [concrete = constants.%X] {} {}
  559. // CHECK:STDOUT: %X.B.cpp_overload_set.value: %X.B.cpp_overload_set.type = cpp_overload_set_value @X.B.cpp_overload_set [concrete = constants.%X.B.cpp_overload_set.value]
  560. // CHECK:STDOUT: %B__carbon_thunk.decl: %B__carbon_thunk.type = fn_decl @B__carbon_thunk [concrete = constants.%B__carbon_thunk] {
  561. // CHECK:STDOUT: %this.patt: %pattern_type.46b = ref_binding_pattern this [concrete]
  562. // CHECK:STDOUT: %this.param_patt: %pattern_type.46b = ref_param_pattern %this.patt, call_param0 [concrete]
  563. // CHECK:STDOUT: %a.patt: %pattern_type.7ce = value_binding_pattern a [concrete]
  564. // CHECK:STDOUT: %a.param_patt: %pattern_type.7ce = value_param_pattern %a.patt, call_param1 [concrete]
  565. // CHECK:STDOUT: } {
  566. // CHECK:STDOUT: %this.param: ref %X = ref_param call_param0
  567. // CHECK:STDOUT: %this: ref %X = ref_binding this, %this.param
  568. // CHECK:STDOUT: %a.param: %i32 = value_param call_param1
  569. // CHECK:STDOUT: %.1: type = splice_block %i32.2 [concrete = constants.%i32] {
  570. // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  571. // CHECK:STDOUT: %i32.1: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
  572. // CHECK:STDOUT: %i32.2: type = type_literal %i32.1 [concrete = constants.%i32]
  573. // CHECK:STDOUT: }
  574. // CHECK:STDOUT: %a: %i32 = value_binding a, %a.param
  575. // CHECK:STDOUT: }
  576. // CHECK:STDOUT: %X.C.cpp_overload_set.value: %X.C.cpp_overload_set.type = cpp_overload_set_value @X.C.cpp_overload_set [concrete = constants.%X.C.cpp_overload_set.value]
  577. // CHECK:STDOUT: %C__carbon_thunk.decl: %C__carbon_thunk.type = fn_decl @C__carbon_thunk [concrete = constants.%C__carbon_thunk] {
  578. // CHECK:STDOUT: %a.patt: %pattern_type.7ce = value_binding_pattern a [concrete]
  579. // CHECK:STDOUT: %a.param_patt: %pattern_type.7ce = value_param_pattern %a.patt, call_param0 [concrete]
  580. // CHECK:STDOUT: } {
  581. // CHECK:STDOUT: %a.param: %i32 = value_param call_param0
  582. // CHECK:STDOUT: %.1: type = splice_block %i32.2 [concrete = constants.%i32] {
  583. // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  584. // CHECK:STDOUT: %i32.1: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
  585. // CHECK:STDOUT: %i32.2: type = type_literal %i32.1 [concrete = constants.%i32]
  586. // CHECK:STDOUT: }
  587. // CHECK:STDOUT: %a: %i32 = value_binding a, %a.param
  588. // CHECK:STDOUT: }
  589. // CHECK:STDOUT: %X.D.cpp_overload_set.value: %X.D.cpp_overload_set.type = cpp_overload_set_value @X.D.cpp_overload_set [concrete = constants.%X.D.cpp_overload_set.value]
  590. // CHECK:STDOUT: %D__carbon_thunk.decl: %D__carbon_thunk.type = fn_decl @D__carbon_thunk [concrete = constants.%D__carbon_thunk] {
  591. // CHECK:STDOUT: %_.patt: %pattern_type.45c = value_binding_pattern _ [concrete]
  592. // CHECK:STDOUT: %_.param_patt: %pattern_type.45c = value_param_pattern %_.patt, call_param0 [concrete]
  593. // CHECK:STDOUT: %a.patt: %pattern_type.7ce = value_binding_pattern a [concrete]
  594. // CHECK:STDOUT: %a.param_patt: %pattern_type.7ce = value_param_pattern %a.patt, call_param1 [concrete]
  595. // CHECK:STDOUT: } {
  596. // CHECK:STDOUT: %_.param: %ptr.1f9 = value_param call_param0
  597. // CHECK:STDOUT: %_: %ptr.1f9 = value_binding _, %_.param
  598. // CHECK:STDOUT: %a.param: %i32 = value_param call_param1
  599. // CHECK:STDOUT: %.1: type = splice_block %i32.2 [concrete = constants.%i32] {
  600. // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  601. // CHECK:STDOUT: %i32.1: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
  602. // CHECK:STDOUT: %i32.2: type = type_literal %i32.1 [concrete = constants.%i32]
  603. // CHECK:STDOUT: }
  604. // CHECK:STDOUT: %a: %i32 = value_binding a, %a.param
  605. // CHECK:STDOUT: }
  606. // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type]
  607. // CHECK:STDOUT: }
  608. // CHECK:STDOUT:
  609. // CHECK:STDOUT: file {
  610. // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
  611. // CHECK:STDOUT: .Core = imports.%Core
  612. // CHECK:STDOUT: .Cpp = imports.%Cpp
  613. // CHECK:STDOUT: .Call = %Call.decl
  614. // CHECK:STDOUT: }
  615. // CHECK:STDOUT: %Core.import = import Core
  616. // CHECK:STDOUT: %Cpp.import_cpp = import_cpp {
  617. // CHECK:STDOUT: import Cpp "functions.h"
  618. // CHECK:STDOUT: }
  619. // CHECK:STDOUT: %Call.decl: %Call.type = fn_decl @Call [concrete = constants.%Call] {} {}
  620. // CHECK:STDOUT: }
  621. // CHECK:STDOUT:
  622. // CHECK:STDOUT: class @X {
  623. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type]
  624. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete = constants.%complete_type.357]
  625. // CHECK:STDOUT: complete_type_witness = %complete_type
  626. // CHECK:STDOUT:
  627. // CHECK:STDOUT: !members:
  628. // CHECK:STDOUT: .B = imports.%X.B.cpp_overload_set.value
  629. // CHECK:STDOUT: .C = imports.%X.C.cpp_overload_set.value
  630. // CHECK:STDOUT: .D = imports.%X.D.cpp_overload_set.value
  631. // CHECK:STDOUT: import Cpp//...
  632. // CHECK:STDOUT: }
  633. // CHECK:STDOUT:
  634. // CHECK:STDOUT: fn @Call() {
  635. // CHECK:STDOUT: !entry:
  636. // CHECK:STDOUT: %Cpp.ref.loc8: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  637. // CHECK:STDOUT: %GlobalNoReturn.ref.loc8: %GlobalNoReturn.cpp_overload_set.type = name_ref GlobalNoReturn, imports.%GlobalNoReturn.cpp_overload_set.value [concrete = constants.%GlobalNoReturn.cpp_overload_set.value]
  638. // CHECK:STDOUT: %int_1.loc8: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
  639. // CHECK:STDOUT: %int_2.loc8: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc]
  640. // CHECK:STDOUT: %impl.elem0.loc8_22: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5]
  641. // CHECK:STDOUT: %bound_method.loc8_22.1: <bound method> = bound_method %int_1.loc8, %impl.elem0.loc8_22 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.215]
  642. // CHECK:STDOUT: %specific_fn.loc8_22: <specific function> = specific_function %impl.elem0.loc8_22, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
  643. // CHECK:STDOUT: %bound_method.loc8_22.2: <bound method> = bound_method %int_1.loc8, %specific_fn.loc8_22 [concrete = constants.%bound_method.38b]
  644. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc8_22: init %i32 = call %bound_method.loc8_22.2(%int_1.loc8) [concrete = constants.%int_1.5d2]
  645. // CHECK:STDOUT: %.loc8_22.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc8_22 [concrete = constants.%int_1.5d2]
  646. // CHECK:STDOUT: %.loc8_22.2: %i32 = converted %int_1.loc8, %.loc8_22.1 [concrete = constants.%int_1.5d2]
  647. // CHECK:STDOUT: %impl.elem0.loc8_25: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5]
  648. // CHECK:STDOUT: %bound_method.loc8_25.1: <bound method> = bound_method %int_2.loc8, %impl.elem0.loc8_25 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.4e5]
  649. // CHECK:STDOUT: %specific_fn.loc8_25: <specific function> = specific_function %impl.elem0.loc8_25, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
  650. // CHECK:STDOUT: %bound_method.loc8_25.2: <bound method> = bound_method %int_2.loc8, %specific_fn.loc8_25 [concrete = constants.%bound_method.646]
  651. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc8_25: init %i32 = call %bound_method.loc8_25.2(%int_2.loc8) [concrete = constants.%int_2.ef8]
  652. // CHECK:STDOUT: %.loc8_25.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc8_25 [concrete = constants.%int_2.ef8]
  653. // CHECK:STDOUT: %.loc8_25.2: %i32 = converted %int_2.loc8, %.loc8_25.1 [concrete = constants.%int_2.ef8]
  654. // CHECK:STDOUT: %GlobalNoReturn__carbon_thunk.call.loc8: init %empty_tuple.type = call imports.%GlobalNoReturn__carbon_thunk.decl.305fd1.1(%.loc8_22.2, %.loc8_25.2)
  655. // CHECK:STDOUT: name_binding_decl {
  656. // CHECK:STDOUT: %value.patt: %pattern_type.7ce = value_binding_pattern value [concrete]
  657. // CHECK:STDOUT: }
  658. // CHECK:STDOUT: %Cpp.ref.loc9: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  659. // CHECK:STDOUT: %GlobalReturnInt.ref: %GlobalReturnInt.cpp_overload_set.type = name_ref GlobalReturnInt, imports.%GlobalReturnInt.cpp_overload_set.value [concrete = constants.%GlobalReturnInt.cpp_overload_set.value]
  660. // CHECK:STDOUT: %int_1.loc9: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
  661. // CHECK:STDOUT: %int_2.loc9: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc]
  662. // CHECK:STDOUT: %impl.elem0.loc9_47: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5]
  663. // CHECK:STDOUT: %bound_method.loc9_47.1: <bound method> = bound_method %int_1.loc9, %impl.elem0.loc9_47 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.215]
  664. // CHECK:STDOUT: %specific_fn.loc9_47: <specific function> = specific_function %impl.elem0.loc9_47, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
  665. // CHECK:STDOUT: %bound_method.loc9_47.2: <bound method> = bound_method %int_1.loc9, %specific_fn.loc9_47 [concrete = constants.%bound_method.38b]
  666. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc9_47: init %i32 = call %bound_method.loc9_47.2(%int_1.loc9) [concrete = constants.%int_1.5d2]
  667. // CHECK:STDOUT: %.loc9_47.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc9_47 [concrete = constants.%int_1.5d2]
  668. // CHECK:STDOUT: %.loc9_47.2: %i32 = converted %int_1.loc9, %.loc9_47.1 [concrete = constants.%int_1.5d2]
  669. // CHECK:STDOUT: %impl.elem0.loc9_50: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5]
  670. // CHECK:STDOUT: %bound_method.loc9_50.1: <bound method> = bound_method %int_2.loc9, %impl.elem0.loc9_50 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.4e5]
  671. // CHECK:STDOUT: %specific_fn.loc9_50: <specific function> = specific_function %impl.elem0.loc9_50, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
  672. // CHECK:STDOUT: %bound_method.loc9_50.2: <bound method> = bound_method %int_2.loc9, %specific_fn.loc9_50 [concrete = constants.%bound_method.646]
  673. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc9_50: init %i32 = call %bound_method.loc9_50.2(%int_2.loc9) [concrete = constants.%int_2.ef8]
  674. // CHECK:STDOUT: %.loc9_50.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc9_50 [concrete = constants.%int_2.ef8]
  675. // CHECK:STDOUT: %.loc9_50.2: %i32 = converted %int_2.loc9, %.loc9_50.1 [concrete = constants.%int_2.ef8]
  676. // CHECK:STDOUT: %GlobalReturnInt__carbon_thunk.call: init %i32 = call imports.%GlobalReturnInt__carbon_thunk.decl(%.loc9_47.2, %.loc9_50.2)
  677. // CHECK:STDOUT: %i32: type = type_literal constants.%i32 [concrete = constants.%i32]
  678. // CHECK:STDOUT: %.loc9_51.1: %i32 = value_of_initializer %GlobalReturnInt__carbon_thunk.call
  679. // CHECK:STDOUT: %.loc9_51.2: %i32 = converted %GlobalReturnInt__carbon_thunk.call, %.loc9_51.1
  680. // CHECK:STDOUT: %value: %i32 = value_binding value, %.loc9_51.2
  681. // CHECK:STDOUT: %Cpp.ref.loc10: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  682. // CHECK:STDOUT: %GlobalNoReturn.ref.loc10: %GlobalNoReturn.cpp_overload_set.type = name_ref GlobalNoReturn, imports.%GlobalNoReturn.cpp_overload_set.value [concrete = constants.%GlobalNoReturn.cpp_overload_set.value]
  683. // CHECK:STDOUT: %int_1.loc10: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
  684. // CHECK:STDOUT: %int_2.loc10: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc]
  685. // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [concrete = constants.%int_3.1ba]
  686. // CHECK:STDOUT: %impl.elem0.loc10_22: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5]
  687. // CHECK:STDOUT: %bound_method.loc10_22.1: <bound method> = bound_method %int_1.loc10, %impl.elem0.loc10_22 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.215]
  688. // CHECK:STDOUT: %specific_fn.loc10_22: <specific function> = specific_function %impl.elem0.loc10_22, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
  689. // CHECK:STDOUT: %bound_method.loc10_22.2: <bound method> = bound_method %int_1.loc10, %specific_fn.loc10_22 [concrete = constants.%bound_method.38b]
  690. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc10_22: init %i32 = call %bound_method.loc10_22.2(%int_1.loc10) [concrete = constants.%int_1.5d2]
  691. // CHECK:STDOUT: %.loc10_22.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc10_22 [concrete = constants.%int_1.5d2]
  692. // CHECK:STDOUT: %.loc10_22.2: %i32 = converted %int_1.loc10, %.loc10_22.1 [concrete = constants.%int_1.5d2]
  693. // CHECK:STDOUT: %impl.elem0.loc10_25: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5]
  694. // CHECK:STDOUT: %bound_method.loc10_25.1: <bound method> = bound_method %int_2.loc10, %impl.elem0.loc10_25 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.4e5]
  695. // CHECK:STDOUT: %specific_fn.loc10_25: <specific function> = specific_function %impl.elem0.loc10_25, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
  696. // CHECK:STDOUT: %bound_method.loc10_25.2: <bound method> = bound_method %int_2.loc10, %specific_fn.loc10_25 [concrete = constants.%bound_method.646]
  697. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc10_25: init %i32 = call %bound_method.loc10_25.2(%int_2.loc10) [concrete = constants.%int_2.ef8]
  698. // CHECK:STDOUT: %.loc10_25.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc10_25 [concrete = constants.%int_2.ef8]
  699. // CHECK:STDOUT: %.loc10_25.2: %i32 = converted %int_2.loc10, %.loc10_25.1 [concrete = constants.%int_2.ef8]
  700. // CHECK:STDOUT: %impl.elem0.loc10_28: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5]
  701. // CHECK:STDOUT: %bound_method.loc10_28.1: <bound method> = bound_method %int_3, %impl.elem0.loc10_28 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.061]
  702. // CHECK:STDOUT: %specific_fn.loc10_28: <specific function> = specific_function %impl.elem0.loc10_28, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
  703. // CHECK:STDOUT: %bound_method.loc10_28.2: <bound method> = bound_method %int_3, %specific_fn.loc10_28 [concrete = constants.%bound_method.fa7]
  704. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc10_28: init %i32 = call %bound_method.loc10_28.2(%int_3) [concrete = constants.%int_3.822]
  705. // CHECK:STDOUT: %.loc10_28.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc10_28 [concrete = constants.%int_3.822]
  706. // CHECK:STDOUT: %.loc10_28.2: %i32 = converted %int_3, %.loc10_28.1 [concrete = constants.%int_3.822]
  707. // CHECK:STDOUT: %GlobalNoReturn__carbon_thunk.call.loc10: init %empty_tuple.type = call imports.%GlobalNoReturn__carbon_thunk.decl.305fd1.2(%.loc10_22.2, %.loc10_25.2, %.loc10_28.2)
  708. // CHECK:STDOUT: %.loc11_5.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
  709. // CHECK:STDOUT: %Cpp.ref.loc11: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  710. // CHECK:STDOUT: %X.ref.loc11: type = name_ref X, imports.%X.decl [concrete = constants.%X]
  711. // CHECK:STDOUT: %.loc11_5.2: ref %X = temporary_storage
  712. // CHECK:STDOUT: %.loc11_5.3: init %X to %.loc11_5.2 = class_init () [concrete = constants.%X.val]
  713. // CHECK:STDOUT: %.loc11_5.4: ref %X = temporary %.loc11_5.2, %.loc11_5.3
  714. // CHECK:STDOUT: %.loc11_7: ref %X = converted %.loc11_5.1, %.loc11_5.4
  715. // CHECK:STDOUT: %B.ref: %X.B.cpp_overload_set.type = name_ref B, imports.%X.B.cpp_overload_set.value [concrete = constants.%X.B.cpp_overload_set.value]
  716. // CHECK:STDOUT: %bound_method.loc11_16: <bound method> = bound_method %.loc11_7, %B.ref
  717. // CHECK:STDOUT: %int_1.loc11: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
  718. // CHECK:STDOUT: %impl.elem0.loc11: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5]
  719. // CHECK:STDOUT: %bound_method.loc11_19.1: <bound method> = bound_method %int_1.loc11, %impl.elem0.loc11 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.215]
  720. // CHECK:STDOUT: %specific_fn.loc11: <specific function> = specific_function %impl.elem0.loc11, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
  721. // CHECK:STDOUT: %bound_method.loc11_19.2: <bound method> = bound_method %int_1.loc11, %specific_fn.loc11 [concrete = constants.%bound_method.38b]
  722. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc11: init %i32 = call %bound_method.loc11_19.2(%int_1.loc11) [concrete = constants.%int_1.5d2]
  723. // CHECK:STDOUT: %.loc11_19.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc11 [concrete = constants.%int_1.5d2]
  724. // CHECK:STDOUT: %.loc11_19.2: %i32 = converted %int_1.loc11, %.loc11_19.1 [concrete = constants.%int_1.5d2]
  725. // CHECK:STDOUT: %B__carbon_thunk.call: init %empty_tuple.type = call imports.%B__carbon_thunk.decl(%.loc11_7, %.loc11_19.2)
  726. // CHECK:STDOUT: %Cpp.ref.loc12: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  727. // CHECK:STDOUT: %X.ref.loc12: type = name_ref X, imports.%X.decl [concrete = constants.%X]
  728. // CHECK:STDOUT: %C.ref: %X.C.cpp_overload_set.type = name_ref C, imports.%X.C.cpp_overload_set.value [concrete = constants.%X.C.cpp_overload_set.value]
  729. // CHECK:STDOUT: %int_1.loc12: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
  730. // CHECK:STDOUT: %impl.elem0.loc12: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5]
  731. // CHECK:STDOUT: %bound_method.loc12_11.1: <bound method> = bound_method %int_1.loc12, %impl.elem0.loc12 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.215]
  732. // CHECK:STDOUT: %specific_fn.loc12: <specific function> = specific_function %impl.elem0.loc12, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
  733. // CHECK:STDOUT: %bound_method.loc12_11.2: <bound method> = bound_method %int_1.loc12, %specific_fn.loc12 [concrete = constants.%bound_method.38b]
  734. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc12: init %i32 = call %bound_method.loc12_11.2(%int_1.loc12) [concrete = constants.%int_1.5d2]
  735. // CHECK:STDOUT: %.loc12_11.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc12 [concrete = constants.%int_1.5d2]
  736. // CHECK:STDOUT: %.loc12_11.2: %i32 = converted %int_1.loc12, %.loc12_11.1 [concrete = constants.%int_1.5d2]
  737. // CHECK:STDOUT: %C__carbon_thunk.call: init %empty_tuple.type = call imports.%C__carbon_thunk.decl(%.loc12_11.2)
  738. // CHECK:STDOUT: %.loc13_5.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
  739. // CHECK:STDOUT: %Cpp.ref.loc13: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  740. // CHECK:STDOUT: %X.ref.loc13: type = name_ref X, imports.%X.decl [concrete = constants.%X]
  741. // CHECK:STDOUT: %.loc13_5.2: ref %X = temporary_storage
  742. // CHECK:STDOUT: %.loc13_5.3: init %X to %.loc13_5.2 = class_init () [concrete = constants.%X.val]
  743. // CHECK:STDOUT: %.loc13_5.4: ref %X = temporary %.loc13_5.2, %.loc13_5.3
  744. // CHECK:STDOUT: %.loc13_7.1: ref %X = converted %.loc13_5.1, %.loc13_5.4
  745. // CHECK:STDOUT: %D.ref: %X.D.cpp_overload_set.type = name_ref D, imports.%X.D.cpp_overload_set.value [concrete = constants.%X.D.cpp_overload_set.value]
  746. // CHECK:STDOUT: %bound_method.loc13_16: <bound method> = bound_method %.loc13_7.1, %D.ref
  747. // CHECK:STDOUT: %int_1.loc13: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
  748. // CHECK:STDOUT: %.loc13_7.2: %X = acquire_value %.loc13_7.1
  749. // CHECK:STDOUT: %impl.elem0.loc13: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5]
  750. // CHECK:STDOUT: %bound_method.loc13_19.1: <bound method> = bound_method %int_1.loc13, %impl.elem0.loc13 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.215]
  751. // CHECK:STDOUT: %specific_fn.loc13: <specific function> = specific_function %impl.elem0.loc13, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
  752. // CHECK:STDOUT: %bound_method.loc13_19.2: <bound method> = bound_method %int_1.loc13, %specific_fn.loc13 [concrete = constants.%bound_method.38b]
  753. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc13: init %i32 = call %bound_method.loc13_19.2(%int_1.loc13) [concrete = constants.%int_1.5d2]
  754. // CHECK:STDOUT: %.loc13_19.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc13 [concrete = constants.%int_1.5d2]
  755. // CHECK:STDOUT: %.loc13_19.2: %i32 = converted %int_1.loc13, %.loc13_19.1 [concrete = constants.%int_1.5d2]
  756. // CHECK:STDOUT: %.loc13_7.3: ref %X = value_as_ref %.loc13_7.2
  757. // CHECK:STDOUT: %addr: %ptr.1f9 = addr_of %.loc13_7.3
  758. // CHECK:STDOUT: %D__carbon_thunk.call: init %empty_tuple.type = call imports.%D__carbon_thunk.decl(%addr, %.loc13_19.2)
  759. // CHECK:STDOUT: %X.cpp_destructor.bound.loc13: <bound method> = bound_method %.loc13_5.4, constants.%X.cpp_destructor
  760. // CHECK:STDOUT: %X.cpp_destructor.call.loc13: init %empty_tuple.type = call %X.cpp_destructor.bound.loc13(%.loc13_5.4)
  761. // CHECK:STDOUT: %X.cpp_destructor.bound.loc11: <bound method> = bound_method %.loc11_5.4, constants.%X.cpp_destructor
  762. // CHECK:STDOUT: %X.cpp_destructor.call.loc11: init %empty_tuple.type = call %X.cpp_destructor.bound.loc11(%.loc11_5.4)
  763. // CHECK:STDOUT: return
  764. // CHECK:STDOUT: }
  765. // CHECK:STDOUT:
  766. // CHECK:STDOUT: fn @GlobalNoReturn.1(%a.param: %i32, %b.param: %i32);
  767. // CHECK:STDOUT:
  768. // CHECK:STDOUT: fn @GlobalNoReturn__carbon_thunk.1(%a.param: %i32, %b.param: %i32);
  769. // CHECK:STDOUT:
  770. // CHECK:STDOUT: fn @GlobalReturnInt(%a.param: %i32, %b.param: %i32) -> out %return.param: %i32;
  771. // CHECK:STDOUT:
  772. // CHECK:STDOUT: fn @GlobalReturnInt__carbon_thunk(%a.param: %i32, %b.param: %i32) -> out %return.param: %i32;
  773. // CHECK:STDOUT:
  774. // CHECK:STDOUT: fn @GlobalNoReturn.2(%a.param: %i32, %b.param: %i32, %c.param: %i32);
  775. // CHECK:STDOUT:
  776. // CHECK:STDOUT: fn @GlobalNoReturn__carbon_thunk.2(%a.param: %i32, %b.param: %i32, %c.param: %i32);
  777. // CHECK:STDOUT:
  778. // CHECK:STDOUT: fn @X.B(%self.param: ref %X, %a.param: %i32);
  779. // CHECK:STDOUT:
  780. // CHECK:STDOUT: fn @B__carbon_thunk(%this.param: ref %X, %a.param: %i32);
  781. // CHECK:STDOUT:
  782. // CHECK:STDOUT: fn @X.C(%a.param: %i32);
  783. // CHECK:STDOUT:
  784. // CHECK:STDOUT: fn @C__carbon_thunk(%a.param: %i32);
  785. // CHECK:STDOUT:
  786. // CHECK:STDOUT: fn @X.D(%self.param: %X, %a.param: %i32);
  787. // CHECK:STDOUT:
  788. // CHECK:STDOUT: fn @D__carbon_thunk(%_.param: %ptr.1f9, %a.param: %i32);
  789. // CHECK:STDOUT:
  790. // CHECK:STDOUT: fn @X.cpp_destructor(%self.param: ref %X) = "no_op";
  791. // CHECK:STDOUT:
  792. // CHECK:STDOUT: --- fail_call_too_few_args.carbon
  793. // CHECK:STDOUT:
  794. // CHECK:STDOUT: constants {
  795. // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
  796. // CHECK:STDOUT: %GlobalNoReturn.cpp_overload_set.type: type = cpp_overload_set_type @GlobalNoReturn.cpp_overload_set [concrete]
  797. // CHECK:STDOUT: %GlobalNoReturn.cpp_overload_set.value: %GlobalNoReturn.cpp_overload_set.type = cpp_overload_set_value @GlobalNoReturn.cpp_overload_set [concrete]
  798. // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete]
  799. // CHECK:STDOUT: %GlobalReturnInt.cpp_overload_set.type: type = cpp_overload_set_type @GlobalReturnInt.cpp_overload_set [concrete]
  800. // CHECK:STDOUT: %GlobalReturnInt.cpp_overload_set.value: %GlobalReturnInt.cpp_overload_set.type = cpp_overload_set_value @GlobalReturnInt.cpp_overload_set [concrete]
  801. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
  802. // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete]
  803. // CHECK:STDOUT: %X: type = class_type @X [concrete]
  804. // CHECK:STDOUT: %X.val: %X = struct_value () [concrete]
  805. // CHECK:STDOUT: %X.B.cpp_overload_set.type: type = cpp_overload_set_type @X.B.cpp_overload_set [concrete]
  806. // CHECK:STDOUT: %X.B.cpp_overload_set.value: %X.B.cpp_overload_set.type = cpp_overload_set_value @X.B.cpp_overload_set [concrete]
  807. // CHECK:STDOUT: %X.C.cpp_overload_set.type: type = cpp_overload_set_type @X.C.cpp_overload_set [concrete]
  808. // CHECK:STDOUT: %X.C.cpp_overload_set.value: %X.C.cpp_overload_set.type = cpp_overload_set_value @X.C.cpp_overload_set [concrete]
  809. // CHECK:STDOUT: %X.D.cpp_overload_set.type: type = cpp_overload_set_type @X.D.cpp_overload_set [concrete]
  810. // CHECK:STDOUT: %X.D.cpp_overload_set.value: %X.D.cpp_overload_set.type = cpp_overload_set_value @X.D.cpp_overload_set [concrete]
  811. // CHECK:STDOUT: %X.cpp_destructor.type: type = fn_type @X.cpp_destructor [concrete]
  812. // CHECK:STDOUT: %X.cpp_destructor: %X.cpp_destructor.type = struct_value () [concrete]
  813. // CHECK:STDOUT: }
  814. // CHECK:STDOUT:
  815. // CHECK:STDOUT: imports {
  816. // CHECK:STDOUT: %Cpp: <namespace> = namespace file.%Cpp.import_cpp, [concrete] {
  817. // CHECK:STDOUT: .GlobalNoReturn = %GlobalNoReturn.cpp_overload_set.value
  818. // CHECK:STDOUT: .GlobalReturnInt = %GlobalReturnInt.cpp_overload_set.value
  819. // CHECK:STDOUT: .X = %X.decl
  820. // CHECK:STDOUT: import Cpp//...
  821. // CHECK:STDOUT: }
  822. // CHECK:STDOUT: %GlobalNoReturn.cpp_overload_set.value: %GlobalNoReturn.cpp_overload_set.type = cpp_overload_set_value @GlobalNoReturn.cpp_overload_set [concrete = constants.%GlobalNoReturn.cpp_overload_set.value]
  823. // CHECK:STDOUT: %GlobalReturnInt.cpp_overload_set.value: %GlobalReturnInt.cpp_overload_set.type = cpp_overload_set_value @GlobalReturnInt.cpp_overload_set [concrete = constants.%GlobalReturnInt.cpp_overload_set.value]
  824. // CHECK:STDOUT: %X.decl: type = class_decl @X [concrete = constants.%X] {} {}
  825. // CHECK:STDOUT: %X.B.cpp_overload_set.value: %X.B.cpp_overload_set.type = cpp_overload_set_value @X.B.cpp_overload_set [concrete = constants.%X.B.cpp_overload_set.value]
  826. // CHECK:STDOUT: %X.C.cpp_overload_set.value: %X.C.cpp_overload_set.type = cpp_overload_set_value @X.C.cpp_overload_set [concrete = constants.%X.C.cpp_overload_set.value]
  827. // CHECK:STDOUT: %X.D.cpp_overload_set.value: %X.D.cpp_overload_set.type = cpp_overload_set_value @X.D.cpp_overload_set [concrete = constants.%X.D.cpp_overload_set.value]
  828. // CHECK:STDOUT: }
  829. // CHECK:STDOUT:
  830. // CHECK:STDOUT: fn @Call() {
  831. // CHECK:STDOUT: !entry:
  832. // CHECK:STDOUT: %Cpp.ref.loc16: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  833. // CHECK:STDOUT: %GlobalNoReturn.ref.loc16: %GlobalNoReturn.cpp_overload_set.type = name_ref GlobalNoReturn, imports.%GlobalNoReturn.cpp_overload_set.value [concrete = constants.%GlobalNoReturn.cpp_overload_set.value]
  834. // CHECK:STDOUT: %int_1.loc16: Core.IntLiteral = int_value 1 [concrete = constants.%int_1]
  835. // CHECK:STDOUT: %Cpp.ref.loc26: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  836. // CHECK:STDOUT: %GlobalNoReturn.ref.loc26: %GlobalNoReturn.cpp_overload_set.type = name_ref GlobalNoReturn, imports.%GlobalNoReturn.cpp_overload_set.value [concrete = constants.%GlobalNoReturn.cpp_overload_set.value]
  837. // CHECK:STDOUT: %Cpp.ref.loc36: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  838. // CHECK:STDOUT: %GlobalReturnInt.ref.loc36: %GlobalReturnInt.cpp_overload_set.type = name_ref GlobalReturnInt, imports.%GlobalReturnInt.cpp_overload_set.value [concrete = constants.%GlobalReturnInt.cpp_overload_set.value]
  839. // CHECK:STDOUT: %int_1.loc36: Core.IntLiteral = int_value 1 [concrete = constants.%int_1]
  840. // CHECK:STDOUT: %Cpp.ref.loc46: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  841. // CHECK:STDOUT: %GlobalReturnInt.ref.loc46: %GlobalReturnInt.cpp_overload_set.type = name_ref GlobalReturnInt, imports.%GlobalReturnInt.cpp_overload_set.value [concrete = constants.%GlobalReturnInt.cpp_overload_set.value]
  842. // CHECK:STDOUT: %.loc56_5.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
  843. // CHECK:STDOUT: %Cpp.ref.loc56: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  844. // CHECK:STDOUT: %X.ref.loc56: type = name_ref X, imports.%X.decl [concrete = constants.%X]
  845. // CHECK:STDOUT: %.loc56_5.2: ref %X = temporary_storage
  846. // CHECK:STDOUT: %.loc56_5.3: init %X to %.loc56_5.2 = class_init () [concrete = constants.%X.val]
  847. // CHECK:STDOUT: %.loc56_5.4: ref %X = temporary %.loc56_5.2, %.loc56_5.3
  848. // CHECK:STDOUT: %.loc56_7: ref %X = converted %.loc56_5.1, %.loc56_5.4
  849. // CHECK:STDOUT: %B.ref: %X.B.cpp_overload_set.type = name_ref B, imports.%X.B.cpp_overload_set.value [concrete = constants.%X.B.cpp_overload_set.value]
  850. // CHECK:STDOUT: %bound_method.loc56: <bound method> = bound_method %.loc56_7, %B.ref
  851. // CHECK:STDOUT: %Cpp.ref.loc66: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  852. // CHECK:STDOUT: %X.ref.loc66: type = name_ref X, imports.%X.decl [concrete = constants.%X]
  853. // CHECK:STDOUT: %C.ref: %X.C.cpp_overload_set.type = name_ref C, imports.%X.C.cpp_overload_set.value [concrete = constants.%X.C.cpp_overload_set.value]
  854. // CHECK:STDOUT: %.loc76_5.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
  855. // CHECK:STDOUT: %Cpp.ref.loc76: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  856. // CHECK:STDOUT: %X.ref.loc76: type = name_ref X, imports.%X.decl [concrete = constants.%X]
  857. // CHECK:STDOUT: %.loc76_5.2: ref %X = temporary_storage
  858. // CHECK:STDOUT: %.loc76_5.3: init %X to %.loc76_5.2 = class_init () [concrete = constants.%X.val]
  859. // CHECK:STDOUT: %.loc76_5.4: ref %X = temporary %.loc76_5.2, %.loc76_5.3
  860. // CHECK:STDOUT: %.loc76_7: ref %X = converted %.loc76_5.1, %.loc76_5.4
  861. // CHECK:STDOUT: %D.ref: %X.D.cpp_overload_set.type = name_ref D, imports.%X.D.cpp_overload_set.value [concrete = constants.%X.D.cpp_overload_set.value]
  862. // CHECK:STDOUT: %bound_method.loc76: <bound method> = bound_method %.loc76_7, %D.ref
  863. // CHECK:STDOUT: %X.cpp_destructor.bound.loc76: <bound method> = bound_method %.loc76_5.4, constants.%X.cpp_destructor
  864. // CHECK:STDOUT: %X.cpp_destructor.call.loc76: init %empty_tuple.type = call %X.cpp_destructor.bound.loc76(%.loc76_5.4)
  865. // CHECK:STDOUT: %X.cpp_destructor.bound.loc56: <bound method> = bound_method %.loc56_5.4, constants.%X.cpp_destructor
  866. // CHECK:STDOUT: %X.cpp_destructor.call.loc56: init %empty_tuple.type = call %X.cpp_destructor.bound.loc56(%.loc56_5.4)
  867. // CHECK:STDOUT: <elided>
  868. // CHECK:STDOUT: }
  869. // CHECK:STDOUT: