builtins.llp64.carbon 39 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447
  1. // Part of the Carbon Language project, under the Apache License v2.0 with LLVM
  2. // Exceptions. See /LICENSE for license information.
  3. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  4. //
  5. // INCLUDE-FILE: toolchain/testing/testdata/min_prelude/full.carbon
  6. // EXTRA-ARGS: --target=x86_64-pc-windows-msvc --clang-arg=-fno-PIE
  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/builtins.llp64.carbon
  11. // TIP: To dump output, run:
  12. // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/interop/cpp/builtins.llp64.carbon
  13. // --- supported_types.carbon
  14. library "[[@TEST_NAME]]";
  15. import Cpp inline
  16. '''
  17. class LongResult {};
  18. auto PassLong(long x) -> LongResult;
  19. class IntResult {};
  20. auto PassLong(int x) -> IntResult;
  21. ''';
  22. fn F() {
  23. //@dump-sem-ir-begin
  24. let cpp_long_long : Cpp.long_long = 1 as i64;
  25. let carbon_long_long: i64 = cpp_long_long;
  26. let cpp_long: Cpp.long = 1 as i32;
  27. let cpp_long_result: Cpp.LongResult = Cpp.PassLong(cpp_long);
  28. let cpp_compat_long: Core.CppCompat.Long32 = cpp_long;
  29. let cpp_compat_long_long_result: Cpp.LongResult = Cpp.PassLong(cpp_long);
  30. let carbon_i32: i32 = cpp_long;
  31. let carbon_i32_result: Cpp.IntResult = Cpp.PassLong(carbon_i32);
  32. let cpp_unsigned_long_long : Cpp.unsigned_long_long = 1 as u64;
  33. let carbon_unsigned_long_long: u64 = cpp_unsigned_long_long;
  34. //@dump-sem-ir-end
  35. }
  36. // --- fail_todo_unsupported_types.carbon
  37. library "[[@TEST_NAME]]";
  38. import Cpp;
  39. fn F() {
  40. //@dump-sem-ir-begin
  41. // CHECK:STDERR: fail_todo_unsupported_types.carbon:[[@LINE+7]]:27: error: semantics TODO: `Unsupported: builtin type: unsigned long` [SemanticsTodo]
  42. // CHECK:STDERR: let cpp_unsigned_long : Cpp.unsigned_long = 1 as u64;
  43. // CHECK:STDERR: ^~~~~~~~~~~~~~~~~
  44. // CHECK:STDERR: fail_todo_unsupported_types.carbon:[[@LINE+4]]:27: note: in `Cpp` name lookup for `unsigned_long` [InCppNameLookup]
  45. // CHECK:STDERR: let cpp_unsigned_long : Cpp.unsigned_long = 1 as u64;
  46. // CHECK:STDERR: ^~~~~~~~~~~~~~~~~
  47. // CHECK:STDERR:
  48. let cpp_unsigned_long : Cpp.unsigned_long = 1 as u64;
  49. let carbon_unsigned_long: u64 = cpp_unsigned_long;
  50. //@dump-sem-ir-end
  51. }
  52. // CHECK:STDOUT: --- supported_types.carbon
  53. // CHECK:STDOUT:
  54. // CHECK:STDOUT: constants {
  55. // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
  56. // CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [concrete]
  57. // CHECK:STDOUT: %Int.type: type = generic_class_type @Int [concrete]
  58. // CHECK:STDOUT: %Int.generic: %Int.type = struct_value () [concrete]
  59. // CHECK:STDOUT: %i64: type = class_type @Int, @Int(%int_64) [concrete]
  60. // CHECK:STDOUT: %pattern_type.95b: type = pattern_type %i64 [concrete]
  61. // CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete]
  62. // CHECK:STDOUT: %As.type.90f: type = generic_interface_type @As [concrete]
  63. // CHECK:STDOUT: %As.generic: %As.type.90f = struct_value () [concrete]
  64. // CHECK:STDOUT: %As.type.bbb: type = facet_type <@As, @As(%i64)> [concrete]
  65. // CHECK:STDOUT: %As.Convert.type.d57: type = fn_type @As.Convert, @As(%i64) [concrete]
  66. // CHECK:STDOUT: %To.586: Core.IntLiteral = symbolic_binding To, 0 [symbolic]
  67. // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.type.0fd: type = fn_type @Core.IntLiteral.as.As.impl.Convert.1, @Core.IntLiteral.as.As.impl.863(%To.586) [symbolic]
  68. // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.2b1: %Core.IntLiteral.as.As.impl.Convert.type.0fd = struct_value () [symbolic]
  69. // CHECK:STDOUT: %As.impl_witness.c40: <witness> = impl_witness imports.%As.impl_witness_table.251, @Core.IntLiteral.as.As.impl.863(%int_64) [concrete]
  70. // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.type.4f0: type = fn_type @Core.IntLiteral.as.As.impl.Convert.1, @Core.IntLiteral.as.As.impl.863(%int_64) [concrete]
  71. // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.108: %Core.IntLiteral.as.As.impl.Convert.type.4f0 = struct_value () [concrete]
  72. // CHECK:STDOUT: %As.facet.2cd: %As.type.bbb = facet_value Core.IntLiteral, (%As.impl_witness.c40) [concrete]
  73. // CHECK:STDOUT: %.277: type = fn_type_with_self_type %As.Convert.type.d57, %As.facet.2cd [concrete]
  74. // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.bound.373: <bound method> = bound_method %int_1.5b8, %Core.IntLiteral.as.As.impl.Convert.108 [concrete]
  75. // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.specific_fn.83e: <specific function> = specific_function %Core.IntLiteral.as.As.impl.Convert.108, @Core.IntLiteral.as.As.impl.Convert.1(%int_64) [concrete]
  76. // CHECK:STDOUT: %bound_method.c84: <bound method> = bound_method %int_1.5b8, %Core.IntLiteral.as.As.impl.Convert.specific_fn.83e [concrete]
  77. // CHECK:STDOUT: %int_1.41a: %i64 = int_value 1 [concrete]
  78. // CHECK:STDOUT: %Cpp.long: type = class_type @Long32 [concrete]
  79. // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete]
  80. // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete]
  81. // CHECK:STDOUT: %pattern_type.68c: type = pattern_type %Cpp.long [concrete]
  82. // CHECK:STDOUT: %As.type.dbd: type = facet_type <@As, @As(%i32)> [concrete]
  83. // CHECK:STDOUT: %As.Convert.type.99b: type = fn_type @As.Convert, @As(%i32) [concrete]
  84. // CHECK:STDOUT: %As.impl_witness.bf0: <witness> = impl_witness imports.%As.impl_witness_table.251, @Core.IntLiteral.as.As.impl.863(%int_32) [concrete]
  85. // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.type.11b: type = fn_type @Core.IntLiteral.as.As.impl.Convert.1, @Core.IntLiteral.as.As.impl.863(%int_32) [concrete]
  86. // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.035: %Core.IntLiteral.as.As.impl.Convert.type.11b = struct_value () [concrete]
  87. // CHECK:STDOUT: %As.facet.1f3: %As.type.dbd = facet_value Core.IntLiteral, (%As.impl_witness.bf0) [concrete]
  88. // CHECK:STDOUT: %.edb: type = fn_type_with_self_type %As.Convert.type.99b, %As.facet.1f3 [concrete]
  89. // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.bound.17b: <bound method> = bound_method %int_1.5b8, %Core.IntLiteral.as.As.impl.Convert.035 [concrete]
  90. // CHECK:STDOUT: %pattern_type.7ce: type = pattern_type %i32 [concrete]
  91. // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.specific_fn.d03: <specific function> = specific_function %Core.IntLiteral.as.As.impl.Convert.035, @Core.IntLiteral.as.As.impl.Convert.1(%int_32) [concrete]
  92. // CHECK:STDOUT: %bound_method.6b2: <bound method> = bound_method %int_1.5b8, %Core.IntLiteral.as.As.impl.Convert.specific_fn.d03 [concrete]
  93. // CHECK:STDOUT: %int_1.5d2: %i32 = int_value 1 [concrete]
  94. // CHECK:STDOUT: %ImplicitAs.type.cc7: type = generic_interface_type @ImplicitAs [concrete]
  95. // CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.cc7 = struct_value () [concrete]
  96. // CHECK:STDOUT: %ImplicitAs.type.c65: type = facet_type <@ImplicitAs, @ImplicitAs(%Cpp.long)> [concrete]
  97. // CHECK:STDOUT: %ImplicitAs.Convert.type.4c2: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%Cpp.long) [concrete]
  98. // CHECK:STDOUT: %ImplicitAs.type.d14: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete]
  99. // CHECK:STDOUT: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete]
  100. // CHECK:STDOUT: %ImplicitAs.impl_witness.9db: <witness> = impl_witness imports.%ImplicitAs.impl_witness_table.bd5 [concrete]
  101. // CHECK:STDOUT: %ImplicitAs.facet.687: %ImplicitAs.type.c65 = facet_value %i32, (%ImplicitAs.impl_witness.9db) [concrete]
  102. // CHECK:STDOUT: %.1bd: type = fn_type_with_self_type %ImplicitAs.Convert.type.4c2, %ImplicitAs.facet.687 [concrete]
  103. // CHECK:STDOUT: %i32.as.ImplicitAs.impl.Convert.type: type = fn_type @i32.as.ImplicitAs.impl.Convert [concrete]
  104. // CHECK:STDOUT: %i32.as.ImplicitAs.impl.Convert: %i32.as.ImplicitAs.impl.Convert.type = struct_value () [concrete]
  105. // CHECK:STDOUT: %i32.as.ImplicitAs.impl.Convert.bound: <bound method> = bound_method %int_1.5d2, %i32.as.ImplicitAs.impl.Convert [concrete]
  106. // CHECK:STDOUT: %int_1.5a4: %Cpp.long = int_value 1 [concrete]
  107. // CHECK:STDOUT: %LongResult: type = class_type @LongResult [concrete]
  108. // CHECK:STDOUT: %pattern_type.cd9: type = pattern_type %LongResult [concrete]
  109. // CHECK:STDOUT: %PassLong.cpp_overload_set.type: type = cpp_overload_set_type @PassLong.cpp_overload_set [concrete]
  110. // CHECK:STDOUT: %PassLong.cpp_overload_set.value: %PassLong.cpp_overload_set.type = cpp_overload_set_value @PassLong.cpp_overload_set [concrete]
  111. // CHECK:STDOUT: %ptr.305: type = ptr_type %LongResult [concrete]
  112. // CHECK:STDOUT: %PassLong__carbon_thunk.type.9d9430.1: type = fn_type @PassLong__carbon_thunk.1 [concrete]
  113. // CHECK:STDOUT: %PassLong__carbon_thunk.58a8f3.1: %PassLong__carbon_thunk.type.9d9430.1 = struct_value () [concrete]
  114. // CHECK:STDOUT: %ImplicitAs.impl_witness.c39: <witness> = impl_witness imports.%ImplicitAs.impl_witness_table.90c [concrete]
  115. // CHECK:STDOUT: %ImplicitAs.facet.a39: %ImplicitAs.type.d14 = facet_value %Cpp.long, (%ImplicitAs.impl_witness.c39) [concrete]
  116. // CHECK:STDOUT: %.261: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet.a39 [concrete]
  117. // CHECK:STDOUT: %Cpp.long.as.ImplicitAs.impl.Convert.type: type = fn_type @Cpp.long.as.ImplicitAs.impl.Convert [concrete]
  118. // CHECK:STDOUT: %Cpp.long.as.ImplicitAs.impl.Convert: %Cpp.long.as.ImplicitAs.impl.Convert.type = struct_value () [concrete]
  119. // CHECK:STDOUT: %IntResult: type = class_type @IntResult [concrete]
  120. // CHECK:STDOUT: %pattern_type.454: type = pattern_type %IntResult [concrete]
  121. // CHECK:STDOUT: %ptr.3cb: type = ptr_type %IntResult [concrete]
  122. // CHECK:STDOUT: %PassLong__carbon_thunk.type.9d9430.2: type = fn_type @PassLong__carbon_thunk.2 [concrete]
  123. // CHECK:STDOUT: %PassLong__carbon_thunk.58a8f3.2: %PassLong__carbon_thunk.type.9d9430.2 = struct_value () [concrete]
  124. // CHECK:STDOUT: %UInt.type: type = generic_class_type @UInt [concrete]
  125. // CHECK:STDOUT: %UInt.generic: %UInt.type = struct_value () [concrete]
  126. // CHECK:STDOUT: %u64: type = class_type @UInt, @UInt(%int_64) [concrete]
  127. // CHECK:STDOUT: %pattern_type.157: type = pattern_type %u64 [concrete]
  128. // CHECK:STDOUT: %As.type.465: type = facet_type <@As, @As(%u64)> [concrete]
  129. // CHECK:STDOUT: %As.Convert.type.7eb: type = fn_type @As.Convert, @As(%u64) [concrete]
  130. // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.type.56b: type = fn_type @Core.IntLiteral.as.As.impl.Convert.2, @Core.IntLiteral.as.As.impl.38a(%To.586) [symbolic]
  131. // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.02d: %Core.IntLiteral.as.As.impl.Convert.type.56b = struct_value () [symbolic]
  132. // CHECK:STDOUT: %As.impl_witness.ed2d: <witness> = impl_witness imports.%As.impl_witness_table.a7d, @Core.IntLiteral.as.As.impl.38a(%int_64) [concrete]
  133. // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.type.422: type = fn_type @Core.IntLiteral.as.As.impl.Convert.2, @Core.IntLiteral.as.As.impl.38a(%int_64) [concrete]
  134. // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.a09: %Core.IntLiteral.as.As.impl.Convert.type.422 = struct_value () [concrete]
  135. // CHECK:STDOUT: %As.facet.bf5: %As.type.465 = facet_value Core.IntLiteral, (%As.impl_witness.ed2d) [concrete]
  136. // CHECK:STDOUT: %.5b8: type = fn_type_with_self_type %As.Convert.type.7eb, %As.facet.bf5 [concrete]
  137. // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.bound.eb8: <bound method> = bound_method %int_1.5b8, %Core.IntLiteral.as.As.impl.Convert.a09 [concrete]
  138. // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.specific_fn.009: <specific function> = specific_function %Core.IntLiteral.as.As.impl.Convert.a09, @Core.IntLiteral.as.As.impl.Convert.2(%int_64) [concrete]
  139. // CHECK:STDOUT: %bound_method.bb9: <bound method> = bound_method %int_1.5b8, %Core.IntLiteral.as.As.impl.Convert.specific_fn.009 [concrete]
  140. // CHECK:STDOUT: %int_1.f23: %u64 = int_value 1 [concrete]
  141. // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete]
  142. // CHECK:STDOUT: %type_where: type = facet_type <type where .Self impls <CanDestroy>> [concrete]
  143. // CHECK:STDOUT: %facet_value.743: %type_where = facet_value %IntResult, () [concrete]
  144. // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.type.3b7: type = fn_type @DestroyT.binding.as_type.as.Destroy.impl.Op, @DestroyT.binding.as_type.as.Destroy.impl(%facet_value.743) [concrete]
  145. // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.515: %DestroyT.binding.as_type.as.Destroy.impl.Op.type.3b7 = struct_value () [concrete]
  146. // CHECK:STDOUT: %facet_value.1e3: %type_where = facet_value %LongResult, () [concrete]
  147. // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.type.6c9: type = fn_type @DestroyT.binding.as_type.as.Destroy.impl.Op, @DestroyT.binding.as_type.as.Destroy.impl(%facet_value.1e3) [concrete]
  148. // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.418: %DestroyT.binding.as_type.as.Destroy.impl.Op.type.6c9 = struct_value () [concrete]
  149. // CHECK:STDOUT: }
  150. // CHECK:STDOUT:
  151. // CHECK:STDOUT: imports {
  152. // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
  153. // CHECK:STDOUT: .Int = %Core.Int
  154. // CHECK:STDOUT: .As = %Core.As
  155. // CHECK:STDOUT: .CppCompat = %CppCompat.c59
  156. // CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs
  157. // CHECK:STDOUT: .UInt = %Core.UInt
  158. // CHECK:STDOUT: .Destroy = %Core.Destroy
  159. // CHECK:STDOUT: import Core//prelude
  160. // CHECK:STDOUT: import Core//prelude/...
  161. // CHECK:STDOUT: }
  162. // CHECK:STDOUT: %Cpp: <namespace> = namespace file.%Cpp.import_cpp, [concrete] {
  163. // CHECK:STDOUT: .long_long = @F.%i64.1
  164. // CHECK:STDOUT: .long = constants.%Cpp.long
  165. // CHECK:STDOUT: .LongResult = %LongResult.decl
  166. // CHECK:STDOUT: .PassLong = %PassLong.cpp_overload_set.value
  167. // CHECK:STDOUT: .IntResult = %IntResult.decl
  168. // CHECK:STDOUT: .unsigned_long_long = @F.%u64.1
  169. // CHECK:STDOUT: import Cpp//...
  170. // CHECK:STDOUT: }
  171. // CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/types/int, Int, loaded [concrete = constants.%Int.generic]
  172. // CHECK:STDOUT: %Core.As: %As.type.90f = import_ref Core//prelude/operators/as, As, loaded [concrete = constants.%As.generic]
  173. // CHECK:STDOUT: %Core.import_ref.05d: @Core.IntLiteral.as.As.impl.863.%Core.IntLiteral.as.As.impl.Convert.type (%Core.IntLiteral.as.As.impl.Convert.type.0fd) = import_ref Core//prelude/types/int, loc{{\d+_\d+}}, loaded [symbolic = @Core.IntLiteral.as.As.impl.863.%Core.IntLiteral.as.As.impl.Convert (constants.%Core.IntLiteral.as.As.impl.Convert.2b1)]
  174. // CHECK:STDOUT: %As.impl_witness_table.251 = impl_witness_table (%Core.import_ref.05d), @Core.IntLiteral.as.As.impl.863 [concrete]
  175. // CHECK:STDOUT: %Core.CppCompat: <namespace> = import_ref Core//prelude, CppCompat, loaded
  176. // CHECK:STDOUT: %CppCompat.c59: <namespace> = namespace %Core.CppCompat, [concrete] {
  177. // CHECK:STDOUT: .Long32 = %Core.Long32
  178. // CHECK:STDOUT: import Core//prelude
  179. // CHECK:STDOUT: import Core//prelude/...
  180. // CHECK:STDOUT: }
  181. // CHECK:STDOUT: %Core.Long32: type = import_ref Core//prelude/types/cpp/int, Long32, loaded [concrete = constants.%Cpp.long]
  182. // CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/operators/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic]
  183. // CHECK:STDOUT: %Core.import_ref.e63: %i32.as.ImplicitAs.impl.Convert.type = import_ref Core//prelude/types/cpp/int, loc{{\d+_\d+}}, loaded [concrete = constants.%i32.as.ImplicitAs.impl.Convert]
  184. // CHECK:STDOUT: %ImplicitAs.impl_witness_table.bd5 = impl_witness_table (%Core.import_ref.e63), @i32.as.ImplicitAs.impl [concrete]
  185. // CHECK:STDOUT: %LongResult.decl: type = class_decl @LongResult [concrete = constants.%LongResult] {} {}
  186. // CHECK:STDOUT: %PassLong.cpp_overload_set.value: %PassLong.cpp_overload_set.type = cpp_overload_set_value @PassLong.cpp_overload_set [concrete = constants.%PassLong.cpp_overload_set.value]
  187. // CHECK:STDOUT: %PassLong__carbon_thunk.decl.d16229.1: %PassLong__carbon_thunk.type.9d9430.1 = fn_decl @PassLong__carbon_thunk.1 [concrete = constants.%PassLong__carbon_thunk.58a8f3.1] {
  188. // CHECK:STDOUT: <elided>
  189. // CHECK:STDOUT: } {
  190. // CHECK:STDOUT: <elided>
  191. // CHECK:STDOUT: }
  192. // CHECK:STDOUT: %Core.import_ref.1a1: %Cpp.long.as.ImplicitAs.impl.Convert.type = import_ref Core//prelude/types/cpp/int, loc{{\d+_\d+}}, loaded [concrete = constants.%Cpp.long.as.ImplicitAs.impl.Convert]
  193. // CHECK:STDOUT: %ImplicitAs.impl_witness_table.90c = impl_witness_table (%Core.import_ref.1a1), @Cpp.long.as.ImplicitAs.impl [concrete]
  194. // CHECK:STDOUT: %IntResult.decl: type = class_decl @IntResult [concrete = constants.%IntResult] {} {}
  195. // CHECK:STDOUT: %PassLong__carbon_thunk.decl.d16229.2: %PassLong__carbon_thunk.type.9d9430.2 = fn_decl @PassLong__carbon_thunk.2 [concrete = constants.%PassLong__carbon_thunk.58a8f3.2] {
  196. // CHECK:STDOUT: <elided>
  197. // CHECK:STDOUT: } {
  198. // CHECK:STDOUT: <elided>
  199. // CHECK:STDOUT: }
  200. // CHECK:STDOUT: %Core.UInt: %UInt.type = import_ref Core//prelude/types/uint, UInt, loaded [concrete = constants.%UInt.generic]
  201. // CHECK:STDOUT: %Core.import_ref.7bb: @Core.IntLiteral.as.As.impl.38a.%Core.IntLiteral.as.As.impl.Convert.type (%Core.IntLiteral.as.As.impl.Convert.type.56b) = import_ref Core//prelude/types/uint, loc{{\d+_\d+}}, loaded [symbolic = @Core.IntLiteral.as.As.impl.38a.%Core.IntLiteral.as.As.impl.Convert (constants.%Core.IntLiteral.as.As.impl.Convert.02d)]
  202. // CHECK:STDOUT: %As.impl_witness_table.a7d = impl_witness_table (%Core.import_ref.7bb), @Core.IntLiteral.as.As.impl.38a [concrete]
  203. // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/destroy, Destroy, loaded [concrete = constants.%Destroy.type]
  204. // CHECK:STDOUT: }
  205. // CHECK:STDOUT:
  206. // CHECK:STDOUT: fn @F() {
  207. // CHECK:STDOUT: !entry:
  208. // CHECK:STDOUT: name_binding_decl {
  209. // CHECK:STDOUT: %cpp_long_long.patt: %pattern_type.95b = value_binding_pattern cpp_long_long [concrete]
  210. // CHECK:STDOUT: }
  211. // CHECK:STDOUT: %int_1.loc15: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
  212. // CHECK:STDOUT: %int_64.loc15: Core.IntLiteral = int_value 64 [concrete = constants.%int_64]
  213. // CHECK:STDOUT: %i64.loc15: type = class_type @Int, @Int(constants.%int_64) [concrete = constants.%i64]
  214. // CHECK:STDOUT: %impl.elem0.loc15: %.277 = impl_witness_access constants.%As.impl_witness.c40, element0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.108]
  215. // CHECK:STDOUT: %bound_method.loc15_41.1: <bound method> = bound_method %int_1.loc15, %impl.elem0.loc15 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.bound.373]
  216. // CHECK:STDOUT: %specific_fn.loc15: <specific function> = specific_function %impl.elem0.loc15, @Core.IntLiteral.as.As.impl.Convert.1(constants.%int_64) [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.specific_fn.83e]
  217. // CHECK:STDOUT: %bound_method.loc15_41.2: <bound method> = bound_method %int_1.loc15, %specific_fn.loc15 [concrete = constants.%bound_method.c84]
  218. // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.call.loc15: init %i64 = call %bound_method.loc15_41.2(%int_1.loc15) [concrete = constants.%int_1.41a]
  219. // CHECK:STDOUT: %.loc15_41.1: %i64 = value_of_initializer %Core.IntLiteral.as.As.impl.Convert.call.loc15 [concrete = constants.%int_1.41a]
  220. // CHECK:STDOUT: %.loc15_41.2: %i64 = converted %int_1.loc15, %.loc15_41.1 [concrete = constants.%int_1.41a]
  221. // CHECK:STDOUT: %.loc15_26: type = splice_block %long_long.ref [concrete = constants.%i64] {
  222. // CHECK:STDOUT: %Cpp.ref.loc15: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  223. // CHECK:STDOUT: <elided>
  224. // CHECK:STDOUT: %long_long.ref: type = name_ref long_long, %i64.1 [concrete = constants.%i64]
  225. // CHECK:STDOUT: }
  226. // CHECK:STDOUT: %cpp_long_long: %i64 = value_binding cpp_long_long, %.loc15_41.2
  227. // CHECK:STDOUT: name_binding_decl {
  228. // CHECK:STDOUT: %carbon_long_long.patt: %pattern_type.95b = value_binding_pattern carbon_long_long [concrete]
  229. // CHECK:STDOUT: }
  230. // CHECK:STDOUT: %cpp_long_long.ref: %i64 = name_ref cpp_long_long, %cpp_long_long
  231. // CHECK:STDOUT: %.loc16: type = splice_block %i64.loc16 [concrete = constants.%i64] {
  232. // CHECK:STDOUT: %int_64.loc16: Core.IntLiteral = int_value 64 [concrete = constants.%int_64]
  233. // CHECK:STDOUT: %i64.loc16: type = class_type @Int, @Int(constants.%int_64) [concrete = constants.%i64]
  234. // CHECK:STDOUT: }
  235. // CHECK:STDOUT: %carbon_long_long: %i64 = value_binding carbon_long_long, %cpp_long_long.ref
  236. // CHECK:STDOUT: name_binding_decl {
  237. // CHECK:STDOUT: %cpp_long.patt: %pattern_type.68c = value_binding_pattern cpp_long [concrete]
  238. // CHECK:STDOUT: }
  239. // CHECK:STDOUT: %int_1.loc18: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
  240. // CHECK:STDOUT: %int_32.loc18: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  241. // CHECK:STDOUT: %i32.loc18: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
  242. // CHECK:STDOUT: %impl.elem0.loc18_30.1: %.edb = impl_witness_access constants.%As.impl_witness.bf0, element0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.035]
  243. // CHECK:STDOUT: %bound_method.loc18_30.1: <bound method> = bound_method %int_1.loc18, %impl.elem0.loc18_30.1 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.bound.17b]
  244. // CHECK:STDOUT: %specific_fn.loc18: <specific function> = specific_function %impl.elem0.loc18_30.1, @Core.IntLiteral.as.As.impl.Convert.1(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.specific_fn.d03]
  245. // CHECK:STDOUT: %bound_method.loc18_30.2: <bound method> = bound_method %int_1.loc18, %specific_fn.loc18 [concrete = constants.%bound_method.6b2]
  246. // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.call.loc18: init %i32 = call %bound_method.loc18_30.2(%int_1.loc18) [concrete = constants.%int_1.5d2]
  247. // CHECK:STDOUT: %.loc18_30.1: %i32 = value_of_initializer %Core.IntLiteral.as.As.impl.Convert.call.loc18 [concrete = constants.%int_1.5d2]
  248. // CHECK:STDOUT: %.loc18_30.2: %i32 = converted %int_1.loc18, %.loc18_30.1 [concrete = constants.%int_1.5d2]
  249. // CHECK:STDOUT: %.loc18_20: type = splice_block %long.ref [concrete = constants.%Cpp.long] {
  250. // CHECK:STDOUT: %Cpp.ref.loc18: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  251. // CHECK:STDOUT: %long.ref: type = name_ref long, constants.%Cpp.long [concrete = constants.%Cpp.long]
  252. // CHECK:STDOUT: }
  253. // CHECK:STDOUT: %impl.elem0.loc18_30.2: %.1bd = impl_witness_access constants.%ImplicitAs.impl_witness.9db, element0 [concrete = constants.%i32.as.ImplicitAs.impl.Convert]
  254. // CHECK:STDOUT: %bound_method.loc18_30.3: <bound method> = bound_method %.loc18_30.2, %impl.elem0.loc18_30.2 [concrete = constants.%i32.as.ImplicitAs.impl.Convert.bound]
  255. // CHECK:STDOUT: %i32.as.ImplicitAs.impl.Convert.call: init %Cpp.long = call %bound_method.loc18_30.3(%.loc18_30.2) [concrete = constants.%int_1.5a4]
  256. // CHECK:STDOUT: %.loc18_30.3: %Cpp.long = value_of_initializer %i32.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_1.5a4]
  257. // CHECK:STDOUT: %.loc18_30.4: %Cpp.long = converted %.loc18_30.2, %.loc18_30.3 [concrete = constants.%int_1.5a4]
  258. // CHECK:STDOUT: %cpp_long: %Cpp.long = value_binding cpp_long, %.loc18_30.4
  259. // CHECK:STDOUT: name_binding_decl {
  260. // CHECK:STDOUT: %cpp_long_result.patt: %pattern_type.cd9 = value_binding_pattern cpp_long_result [concrete]
  261. // CHECK:STDOUT: }
  262. // CHECK:STDOUT: %Cpp.ref.loc19_41: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  263. // CHECK:STDOUT: %PassLong.ref.loc19: %PassLong.cpp_overload_set.type = name_ref PassLong, imports.%PassLong.cpp_overload_set.value [concrete = constants.%PassLong.cpp_overload_set.value]
  264. // CHECK:STDOUT: %cpp_long.ref.loc19: %Cpp.long = name_ref cpp_long, %cpp_long
  265. // CHECK:STDOUT: %.loc19_62.1: ref %LongResult = temporary_storage
  266. // CHECK:STDOUT: %addr.loc19: %ptr.305 = addr_of %.loc19_62.1
  267. // CHECK:STDOUT: %PassLong__carbon_thunk.call.loc19: init %empty_tuple.type = call imports.%PassLong__carbon_thunk.decl.d16229.1(%cpp_long.ref.loc19, %addr.loc19)
  268. // CHECK:STDOUT: %.loc19_62.2: init %LongResult = in_place_init %PassLong__carbon_thunk.call.loc19, %.loc19_62.1
  269. // CHECK:STDOUT: %.loc19_27: type = splice_block %LongResult.ref.loc19 [concrete = constants.%LongResult] {
  270. // CHECK:STDOUT: %Cpp.ref.loc19_24: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  271. // CHECK:STDOUT: %LongResult.ref.loc19: type = name_ref LongResult, imports.%LongResult.decl [concrete = constants.%LongResult]
  272. // CHECK:STDOUT: }
  273. // CHECK:STDOUT: %.loc19_62.3: ref %LongResult = temporary %.loc19_62.1, %.loc19_62.2
  274. // CHECK:STDOUT: %.loc19_62.4: %LongResult = acquire_value %.loc19_62.3
  275. // CHECK:STDOUT: %cpp_long_result: %LongResult = value_binding cpp_long_result, %.loc19_62.4
  276. // CHECK:STDOUT: name_binding_decl {
  277. // CHECK:STDOUT: %cpp_compat_long.patt: %pattern_type.68c = value_binding_pattern cpp_compat_long [concrete]
  278. // CHECK:STDOUT: }
  279. // CHECK:STDOUT: %cpp_long.ref.loc21: %Cpp.long = name_ref cpp_long, %cpp_long
  280. // CHECK:STDOUT: %.loc21: type = splice_block %Long32.ref [concrete = constants.%Cpp.long] {
  281. // CHECK:STDOUT: %Core.ref: <namespace> = name_ref Core, imports.%Core [concrete = imports.%Core]
  282. // CHECK:STDOUT: %CppCompat.ref: <namespace> = name_ref CppCompat, imports.%CppCompat.c59 [concrete = imports.%CppCompat.c59]
  283. // CHECK:STDOUT: %Long32.ref: type = name_ref Long32, imports.%Core.Long32 [concrete = constants.%Cpp.long]
  284. // CHECK:STDOUT: }
  285. // CHECK:STDOUT: %cpp_compat_long: %Cpp.long = value_binding cpp_compat_long, %cpp_long.ref.loc21
  286. // CHECK:STDOUT: name_binding_decl {
  287. // CHECK:STDOUT: %cpp_compat_long_long_result.patt: %pattern_type.cd9 = value_binding_pattern cpp_compat_long_long_result [concrete]
  288. // CHECK:STDOUT: }
  289. // CHECK:STDOUT: %Cpp.ref.loc22_53: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  290. // CHECK:STDOUT: %PassLong.ref.loc22: %PassLong.cpp_overload_set.type = name_ref PassLong, imports.%PassLong.cpp_overload_set.value [concrete = constants.%PassLong.cpp_overload_set.value]
  291. // CHECK:STDOUT: %cpp_long.ref.loc22: %Cpp.long = name_ref cpp_long, %cpp_long
  292. // CHECK:STDOUT: %.loc22_74.1: ref %LongResult = temporary_storage
  293. // CHECK:STDOUT: %addr.loc22: %ptr.305 = addr_of %.loc22_74.1
  294. // CHECK:STDOUT: %PassLong__carbon_thunk.call.loc22: init %empty_tuple.type = call imports.%PassLong__carbon_thunk.decl.d16229.1(%cpp_long.ref.loc22, %addr.loc22)
  295. // CHECK:STDOUT: %.loc22_74.2: init %LongResult = in_place_init %PassLong__carbon_thunk.call.loc22, %.loc22_74.1
  296. // CHECK:STDOUT: %.loc22_39: type = splice_block %LongResult.ref.loc22 [concrete = constants.%LongResult] {
  297. // CHECK:STDOUT: %Cpp.ref.loc22_36: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  298. // CHECK:STDOUT: %LongResult.ref.loc22: type = name_ref LongResult, imports.%LongResult.decl [concrete = constants.%LongResult]
  299. // CHECK:STDOUT: }
  300. // CHECK:STDOUT: %.loc22_74.3: ref %LongResult = temporary %.loc22_74.1, %.loc22_74.2
  301. // CHECK:STDOUT: %.loc22_74.4: %LongResult = acquire_value %.loc22_74.3
  302. // CHECK:STDOUT: %cpp_compat_long_long_result: %LongResult = value_binding cpp_compat_long_long_result, %.loc22_74.4
  303. // CHECK:STDOUT: name_binding_decl {
  304. // CHECK:STDOUT: %carbon_i32.patt: %pattern_type.7ce = value_binding_pattern carbon_i32 [concrete]
  305. // CHECK:STDOUT: }
  306. // CHECK:STDOUT: %cpp_long.ref.loc24: %Cpp.long = name_ref cpp_long, %cpp_long
  307. // CHECK:STDOUT: %.loc24_19: type = splice_block %i32.loc24 [concrete = constants.%i32] {
  308. // CHECK:STDOUT: %int_32.loc24: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  309. // CHECK:STDOUT: %i32.loc24: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
  310. // CHECK:STDOUT: }
  311. // CHECK:STDOUT: %impl.elem0.loc24: %.261 = impl_witness_access constants.%ImplicitAs.impl_witness.c39, element0 [concrete = constants.%Cpp.long.as.ImplicitAs.impl.Convert]
  312. // CHECK:STDOUT: %bound_method.loc24: <bound method> = bound_method %cpp_long.ref.loc24, %impl.elem0.loc24
  313. // CHECK:STDOUT: %Cpp.long.as.ImplicitAs.impl.Convert.call: init %i32 = call %bound_method.loc24(%cpp_long.ref.loc24)
  314. // CHECK:STDOUT: %.loc24_25.1: %i32 = value_of_initializer %Cpp.long.as.ImplicitAs.impl.Convert.call
  315. // CHECK:STDOUT: %.loc24_25.2: %i32 = converted %cpp_long.ref.loc24, %.loc24_25.1
  316. // CHECK:STDOUT: %carbon_i32: %i32 = value_binding carbon_i32, %.loc24_25.2
  317. // CHECK:STDOUT: name_binding_decl {
  318. // CHECK:STDOUT: %carbon_i32_result.patt: %pattern_type.454 = value_binding_pattern carbon_i32_result [concrete]
  319. // CHECK:STDOUT: }
  320. // CHECK:STDOUT: %Cpp.ref.loc25_42: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  321. // CHECK:STDOUT: %PassLong.ref.loc25: %PassLong.cpp_overload_set.type = name_ref PassLong, imports.%PassLong.cpp_overload_set.value [concrete = constants.%PassLong.cpp_overload_set.value]
  322. // CHECK:STDOUT: %carbon_i32.ref: %i32 = name_ref carbon_i32, %carbon_i32
  323. // CHECK:STDOUT: %.loc25_65.1: ref %IntResult = temporary_storage
  324. // CHECK:STDOUT: %addr.loc25: %ptr.3cb = addr_of %.loc25_65.1
  325. // CHECK:STDOUT: %PassLong__carbon_thunk.call.loc25: init %empty_tuple.type = call imports.%PassLong__carbon_thunk.decl.d16229.2(%carbon_i32.ref, %addr.loc25)
  326. // CHECK:STDOUT: %.loc25_65.2: init %IntResult = in_place_init %PassLong__carbon_thunk.call.loc25, %.loc25_65.1
  327. // CHECK:STDOUT: %.loc25_29: type = splice_block %IntResult.ref [concrete = constants.%IntResult] {
  328. // CHECK:STDOUT: %Cpp.ref.loc25_26: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  329. // CHECK:STDOUT: %IntResult.ref: type = name_ref IntResult, imports.%IntResult.decl [concrete = constants.%IntResult]
  330. // CHECK:STDOUT: }
  331. // CHECK:STDOUT: %.loc25_65.3: ref %IntResult = temporary %.loc25_65.1, %.loc25_65.2
  332. // CHECK:STDOUT: %.loc25_65.4: %IntResult = acquire_value %.loc25_65.3
  333. // CHECK:STDOUT: %carbon_i32_result: %IntResult = value_binding carbon_i32_result, %.loc25_65.4
  334. // CHECK:STDOUT: name_binding_decl {
  335. // CHECK:STDOUT: %cpp_unsigned_long_long.patt: %pattern_type.157 = value_binding_pattern cpp_unsigned_long_long [concrete]
  336. // CHECK:STDOUT: }
  337. // CHECK:STDOUT: %int_1.loc27: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
  338. // CHECK:STDOUT: %int_64.loc27: Core.IntLiteral = int_value 64 [concrete = constants.%int_64]
  339. // CHECK:STDOUT: %u64.loc27: type = class_type @UInt, @UInt(constants.%int_64) [concrete = constants.%u64]
  340. // CHECK:STDOUT: %impl.elem0.loc27: %.5b8 = impl_witness_access constants.%As.impl_witness.ed2d, element0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.a09]
  341. // CHECK:STDOUT: %bound_method.loc27_59.1: <bound method> = bound_method %int_1.loc27, %impl.elem0.loc27 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.bound.eb8]
  342. // CHECK:STDOUT: %specific_fn.loc27: <specific function> = specific_function %impl.elem0.loc27, @Core.IntLiteral.as.As.impl.Convert.2(constants.%int_64) [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.specific_fn.009]
  343. // CHECK:STDOUT: %bound_method.loc27_59.2: <bound method> = bound_method %int_1.loc27, %specific_fn.loc27 [concrete = constants.%bound_method.bb9]
  344. // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.call.loc27: init %u64 = call %bound_method.loc27_59.2(%int_1.loc27) [concrete = constants.%int_1.f23]
  345. // CHECK:STDOUT: %.loc27_59.1: %u64 = value_of_initializer %Core.IntLiteral.as.As.impl.Convert.call.loc27 [concrete = constants.%int_1.f23]
  346. // CHECK:STDOUT: %.loc27_59.2: %u64 = converted %int_1.loc27, %.loc27_59.1 [concrete = constants.%int_1.f23]
  347. // CHECK:STDOUT: %.loc27_35: type = splice_block %unsigned_long_long.ref [concrete = constants.%u64] {
  348. // CHECK:STDOUT: %Cpp.ref.loc27: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  349. // CHECK:STDOUT: <elided>
  350. // CHECK:STDOUT: %unsigned_long_long.ref: type = name_ref unsigned_long_long, %u64.1 [concrete = constants.%u64]
  351. // CHECK:STDOUT: }
  352. // CHECK:STDOUT: %cpp_unsigned_long_long: %u64 = value_binding cpp_unsigned_long_long, %.loc27_59.2
  353. // CHECK:STDOUT: name_binding_decl {
  354. // CHECK:STDOUT: %carbon_unsigned_long_long.patt: %pattern_type.157 = value_binding_pattern carbon_unsigned_long_long [concrete]
  355. // CHECK:STDOUT: }
  356. // CHECK:STDOUT: %cpp_unsigned_long_long.ref: %u64 = name_ref cpp_unsigned_long_long, %cpp_unsigned_long_long
  357. // CHECK:STDOUT: %.loc28: type = splice_block %u64.loc28 [concrete = constants.%u64] {
  358. // CHECK:STDOUT: %int_64.loc28: Core.IntLiteral = int_value 64 [concrete = constants.%int_64]
  359. // CHECK:STDOUT: %u64.loc28: type = class_type @UInt, @UInt(constants.%int_64) [concrete = constants.%u64]
  360. // CHECK:STDOUT: }
  361. // CHECK:STDOUT: %carbon_unsigned_long_long: %u64 = value_binding carbon_unsigned_long_long, %cpp_unsigned_long_long.ref
  362. // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.bound.loc25: <bound method> = bound_method %.loc25_65.3, constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.515
  363. // CHECK:STDOUT: <elided>
  364. // CHECK:STDOUT: %bound_method.loc25: <bound method> = bound_method %.loc25_65.3, %DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn.1
  365. // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.call.loc25: init %empty_tuple.type = call %bound_method.loc25(%.loc25_65.3)
  366. // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.bound.loc22: <bound method> = bound_method %.loc22_74.3, constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.418
  367. // CHECK:STDOUT: <elided>
  368. // CHECK:STDOUT: %bound_method.loc22: <bound method> = bound_method %.loc22_74.3, %DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn.2
  369. // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.call.loc22: init %empty_tuple.type = call %bound_method.loc22(%.loc22_74.3)
  370. // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.bound.loc19: <bound method> = bound_method %.loc19_62.3, constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.418
  371. // CHECK:STDOUT: <elided>
  372. // CHECK:STDOUT: %bound_method.loc19: <bound method> = bound_method %.loc19_62.3, %DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn.3
  373. // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.call.loc19: init %empty_tuple.type = call %bound_method.loc19(%.loc19_62.3)
  374. // CHECK:STDOUT: <elided>
  375. // CHECK:STDOUT: }
  376. // CHECK:STDOUT:
  377. // CHECK:STDOUT: --- fail_todo_unsupported_types.carbon
  378. // CHECK:STDOUT:
  379. // CHECK:STDOUT: constants {
  380. // CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete]
  381. // CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [concrete]
  382. // CHECK:STDOUT: %u64: type = class_type @UInt, @UInt(%int_64) [concrete]
  383. // CHECK:STDOUT: %As.type.465: type = facet_type <@As, @As(%u64)> [concrete]
  384. // CHECK:STDOUT: %As.Convert.type.7eb: type = fn_type @As.Convert, @As(%u64) [concrete]
  385. // CHECK:STDOUT: %To.586: Core.IntLiteral = symbolic_binding To, 0 [symbolic]
  386. // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.type.56b: type = fn_type @Core.IntLiteral.as.As.impl.Convert, @Core.IntLiteral.as.As.impl(%To.586) [symbolic]
  387. // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.02d: %Core.IntLiteral.as.As.impl.Convert.type.56b = struct_value () [symbolic]
  388. // CHECK:STDOUT: %As.impl_witness.ed2d: <witness> = impl_witness imports.%As.impl_witness_table.a7d, @Core.IntLiteral.as.As.impl(%int_64) [concrete]
  389. // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.type.422: type = fn_type @Core.IntLiteral.as.As.impl.Convert, @Core.IntLiteral.as.As.impl(%int_64) [concrete]
  390. // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.a09: %Core.IntLiteral.as.As.impl.Convert.type.422 = struct_value () [concrete]
  391. // CHECK:STDOUT: %As.facet: %As.type.465 = facet_value Core.IntLiteral, (%As.impl_witness.ed2d) [concrete]
  392. // CHECK:STDOUT: %.5b8: type = fn_type_with_self_type %As.Convert.type.7eb, %As.facet [concrete]
  393. // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.bound: <bound method> = bound_method %int_1.5b8, %Core.IntLiteral.as.As.impl.Convert.a09 [concrete]
  394. // CHECK:STDOUT: %pattern_type.157: type = pattern_type %u64 [concrete]
  395. // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.specific_fn: <specific function> = specific_function %Core.IntLiteral.as.As.impl.Convert.a09, @Core.IntLiteral.as.As.impl.Convert(%int_64) [concrete]
  396. // CHECK:STDOUT: %bound_method: <bound method> = bound_method %int_1.5b8, %Core.IntLiteral.as.As.impl.Convert.specific_fn [concrete]
  397. // CHECK:STDOUT: %int_1.f23: %u64 = int_value 1 [concrete]
  398. // CHECK:STDOUT: }
  399. // CHECK:STDOUT:
  400. // CHECK:STDOUT: imports {
  401. // CHECK:STDOUT: %Core.import_ref.7bb: @Core.IntLiteral.as.As.impl.%Core.IntLiteral.as.As.impl.Convert.type (%Core.IntLiteral.as.As.impl.Convert.type.56b) = import_ref Core//prelude/types/uint, loc{{\d+_\d+}}, loaded [symbolic = @Core.IntLiteral.as.As.impl.%Core.IntLiteral.as.As.impl.Convert (constants.%Core.IntLiteral.as.As.impl.Convert.02d)]
  402. // CHECK:STDOUT: %As.impl_witness_table.a7d = impl_witness_table (%Core.import_ref.7bb), @Core.IntLiteral.as.As.impl [concrete]
  403. // CHECK:STDOUT: }
  404. // CHECK:STDOUT:
  405. // CHECK:STDOUT: fn @F() {
  406. // CHECK:STDOUT: !entry:
  407. // CHECK:STDOUT: name_binding_decl {
  408. // CHECK:STDOUT: %cpp_unsigned_long.patt: <error> = value_binding_pattern cpp_unsigned_long [concrete]
  409. // CHECK:STDOUT: }
  410. // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
  411. // CHECK:STDOUT: %int_64.loc15: Core.IntLiteral = int_value 64 [concrete = constants.%int_64]
  412. // CHECK:STDOUT: %u64.loc15: type = class_type @UInt, @UInt(constants.%int_64) [concrete = constants.%u64]
  413. // CHECK:STDOUT: %impl.elem0: %.5b8 = impl_witness_access constants.%As.impl_witness.ed2d, element0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.a09]
  414. // CHECK:STDOUT: %bound_method.loc15_49.1: <bound method> = bound_method %int_1, %impl.elem0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.bound]
  415. // CHECK:STDOUT: %specific_fn: <specific function> = specific_function %impl.elem0, @Core.IntLiteral.as.As.impl.Convert(constants.%int_64) [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.specific_fn]
  416. // CHECK:STDOUT: %bound_method.loc15_49.2: <bound method> = bound_method %int_1, %specific_fn [concrete = constants.%bound_method]
  417. // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.call: init %u64 = call %bound_method.loc15_49.2(%int_1) [concrete = constants.%int_1.f23]
  418. // CHECK:STDOUT: %.loc15_49.1: %u64 = value_of_initializer %Core.IntLiteral.as.As.impl.Convert.call [concrete = constants.%int_1.f23]
  419. // CHECK:STDOUT: %.loc15_49.2: %u64 = converted %int_1, %.loc15_49.1 [concrete = constants.%int_1.f23]
  420. // CHECK:STDOUT: <elided>
  421. // CHECK:STDOUT: %cpp_unsigned_long: <error> = value_binding cpp_unsigned_long, <error> [concrete = <error>]
  422. // CHECK:STDOUT: name_binding_decl {
  423. // CHECK:STDOUT: %carbon_unsigned_long.patt: %pattern_type.157 = value_binding_pattern carbon_unsigned_long [concrete]
  424. // CHECK:STDOUT: }
  425. // CHECK:STDOUT: %cpp_unsigned_long.ref: <error> = name_ref cpp_unsigned_long, %cpp_unsigned_long [concrete = <error>]
  426. // CHECK:STDOUT: %.loc16: type = splice_block %u64.loc16 [concrete = constants.%u64] {
  427. // CHECK:STDOUT: %int_64.loc16: Core.IntLiteral = int_value 64 [concrete = constants.%int_64]
  428. // CHECK:STDOUT: %u64.loc16: type = class_type @UInt, @UInt(constants.%int_64) [concrete = constants.%u64]
  429. // CHECK:STDOUT: }
  430. // CHECK:STDOUT: %carbon_unsigned_long: %u64 = value_binding carbon_unsigned_long, <error> [concrete = <error>]
  431. // CHECK:STDOUT: <elided>
  432. // CHECK:STDOUT: }
  433. // CHECK:STDOUT: