Improve CanDestroyType to handle remaining cases (#6943)

This is only fixing the decision about *whether* to produce a witness.
Implementation of the witness is still a TODO, though where a body is
generated, it should also precisely reflect where one _needs_ to be
generated.

Note the tests:

- toolchain/lower/testdata/function/generic/import_core_witness.carbon
- toolchain/lower/testdata/function/generic/import_unused_def.carbon

These tests can probably be produced _without_ Core.Destroy, but I found
the essence of them while trying to build //examples with Core.Destroy
and a simpler minimization wasn't striking me.

Assisted-by: Google Antigravity with Gemini

---------

Co-authored-by: jonmeow <jperkins@google.com>
This commit is contained in:
Jon Ross-Perkins
2026-04-02 22:54:58 +00:00
committed by GitHub
co-authored by jonmeow
parent 1fa7a64cd4
commit 9266ced4e3
212 changed files with 11376 additions and 4978 deletions
+194 -148
View File
@@ -70,132 +70,162 @@ fn ConvertFromConstVoidPtr(p: const Cpp.void*) -> const i32* {
// CHECK:STDOUT: store ptr %U.binding.as_type.as.ImplicitAs.impl.Convert.call, ptr %.loc7_21.2.temp, align 8, !dbg !17
// CHECK:STDOUT: %.loc7_21.4 = load ptr, ptr %.loc7_21.2.temp, align 8, !dbg !17
// CHECK:STDOUT: call void @_Z13take_void_ptrPv(ptr %.loc7_21.4), !dbg !18
// CHECK:STDOUT: call void @"_COp.ee91ab4ecda32839:core.Destroy.Core"(ptr %.loc7_21.2.temp), !dbg !17
// CHECK:STDOUT: ret void, !dbg !19
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: declare void @_Z13take_void_ptrPv(ptr noundef) #1
// CHECK:STDOUT:
// CHECK:STDOUT: ; Function Attrs: nounwind
// CHECK:STDOUT: define void @_CPassIntPtr.Main(ptr %a) #0 !dbg !20 {
// CHECK:STDOUT: define weak_odr void @"_COp.39ca70f0f5ff2105:core.Destroy.Core"(ptr %self) #0 !dbg !20 {
// CHECK:STDOUT: entry:
// CHECK:STDOUT: %.loc11_21.2.temp = alloca ptr, align 8, !dbg !23
// CHECK:STDOUT: %U.binding.as_type.as.ImplicitAs.impl.Convert.call = call ptr @"_CConvert.e5cf8fcbb4feaae2:ImplicitAs.0f95c9e18c91e00a.Core.295aa3526801a9d4"(ptr %a), !dbg !23
// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc11_21.2.temp), !dbg !23
// CHECK:STDOUT: store ptr %U.binding.as_type.as.ImplicitAs.impl.Convert.call, ptr %.loc11_21.2.temp, align 8, !dbg !23
// CHECK:STDOUT: %.loc11_21.4 = load ptr, ptr %.loc11_21.2.temp, align 8, !dbg !23
// CHECK:STDOUT: call void @_Z13take_void_ptrPv(ptr %.loc11_21.4), !dbg !24
// CHECK:STDOUT: ret void, !dbg !25
// CHECK:STDOUT: ret void, !dbg !23
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: ; Function Attrs: nounwind
// CHECK:STDOUT: define void @_CPassIntPtrToConstVoidPtr.Main(ptr %a) #0 !dbg !26 {
// CHECK:STDOUT: define weak_odr void @"_COp.ee91ab4ecda32839:core.Destroy.Core"(ptr %self) #0 !dbg !24 {
// CHECK:STDOUT: entry:
// CHECK:STDOUT: %.loc15_27.2.temp = alloca ptr, align 8, !dbg !29
// CHECK:STDOUT: %U.binding.as_type.as.ImplicitAs.impl.Convert.call = call ptr @"_CConvert.e5cf8fcbb4feaae2:ImplicitAs.0f95c9e18c91e00a.Core.e995c7ea1c3d1cc3"(ptr %a), !dbg !29
// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc15_27.2.temp), !dbg !29
// CHECK:STDOUT: store ptr %U.binding.as_type.as.ImplicitAs.impl.Convert.call, ptr %.loc15_27.2.temp, align 8, !dbg !29
// CHECK:STDOUT: %.loc15_27.4 = load ptr, ptr %.loc15_27.2.temp, align 8, !dbg !29
// CHECK:STDOUT: call void @_Z19take_const_void_ptrPKv(ptr %.loc15_27.4), !dbg !30
// CHECK:STDOUT: ret void, !dbg !31
// CHECK:STDOUT: ret void, !dbg !27
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: ; Function Attrs: nounwind
// CHECK:STDOUT: define void @_CPassIntPtr.Main(ptr %a) #0 !dbg !28 {
// CHECK:STDOUT: entry:
// CHECK:STDOUT: %.loc11_21.2.temp = alloca ptr, align 8, !dbg !31
// CHECK:STDOUT: %U.binding.as_type.as.ImplicitAs.impl.Convert.call = call ptr @"_CConvert.e5cf8fcbb4feaae2:ImplicitAs.0f95c9e18c91e00a.Core.295aa3526801a9d4"(ptr %a), !dbg !31
// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc11_21.2.temp), !dbg !31
// CHECK:STDOUT: store ptr %U.binding.as_type.as.ImplicitAs.impl.Convert.call, ptr %.loc11_21.2.temp, align 8, !dbg !31
// CHECK:STDOUT: %.loc11_21.4 = load ptr, ptr %.loc11_21.2.temp, align 8, !dbg !31
// CHECK:STDOUT: call void @_Z13take_void_ptrPv(ptr %.loc11_21.4), !dbg !32
// CHECK:STDOUT: call void @"_COp.ee91ab4ecda32839:core.Destroy.Core"(ptr %.loc11_21.2.temp), !dbg !31
// CHECK:STDOUT: ret void, !dbg !33
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: ; Function Attrs: nounwind
// CHECK:STDOUT: define void @_CPassIntPtrToConstVoidPtr.Main(ptr %a) #0 !dbg !34 {
// CHECK:STDOUT: entry:
// CHECK:STDOUT: %.loc15_27.2.temp = alloca ptr, align 8, !dbg !37
// CHECK:STDOUT: %U.binding.as_type.as.ImplicitAs.impl.Convert.call = call ptr @"_CConvert.e5cf8fcbb4feaae2:ImplicitAs.0f95c9e18c91e00a.Core.e995c7ea1c3d1cc3"(ptr %a), !dbg !37
// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc15_27.2.temp), !dbg !37
// CHECK:STDOUT: store ptr %U.binding.as_type.as.ImplicitAs.impl.Convert.call, ptr %.loc15_27.2.temp, align 8, !dbg !37
// CHECK:STDOUT: %.loc15_27.4 = load ptr, ptr %.loc15_27.2.temp, align 8, !dbg !37
// CHECK:STDOUT: call void @_Z19take_const_void_ptrPKv(ptr %.loc15_27.4), !dbg !38
// CHECK:STDOUT: call void @"_COp.0d7a529f95147939:core.Destroy.Core"(ptr %.loc15_27.2.temp), !dbg !37
// CHECK:STDOUT: ret void, !dbg !39
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: declare void @_Z19take_const_void_ptrPKv(ptr noundef) #1
// CHECK:STDOUT:
// CHECK:STDOUT: ; Function Attrs: nounwind
// CHECK:STDOUT: define void @_CPassConstIntPtrToConstVoidPtr.Main(ptr %a) #0 !dbg !32 {
// CHECK:STDOUT: define weak_odr void @"_COp.02b26c7ebd9c0872:core.Destroy.Core"(ptr %self) #0 !dbg !40 {
// CHECK:STDOUT: entry:
// CHECK:STDOUT: %.loc19_27.2.temp = alloca ptr, align 8, !dbg !35
// CHECK:STDOUT: %U.binding.as_type.as.ImplicitAs.impl.Convert.call = call ptr @"_CConvert.e5cf8fcbb4feaae2:ImplicitAs.0f95c9e18c91e00a.Core.e995c7ea1c3d1cc3"(ptr %a), !dbg !35
// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc19_27.2.temp), !dbg !35
// CHECK:STDOUT: store ptr %U.binding.as_type.as.ImplicitAs.impl.Convert.call, ptr %.loc19_27.2.temp, align 8, !dbg !35
// CHECK:STDOUT: %.loc19_27.4 = load ptr, ptr %.loc19_27.2.temp, align 8, !dbg !35
// CHECK:STDOUT: call void @_Z19take_const_void_ptrPKv(ptr %.loc19_27.4), !dbg !36
// CHECK:STDOUT: ret void, !dbg !37
// CHECK:STDOUT: ret void, !dbg !43
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: ; Function Attrs: nounwind
// CHECK:STDOUT: define linkonce_odr ptr @"_CConvert.e5cf8fcbb4feaae2:ImplicitAs.0f95c9e18c91e00a.Core.66983884551336cb"(ptr %self) #0 !dbg !38 {
// CHECK:STDOUT: %1 = call ptr @"_CConvert.90961d7b1ce4f089:OptionalAs.0e326e799dad0c64.Core.7bed839a0b822504"(ptr %self), !dbg !44
// CHECK:STDOUT: ret ptr %1, !dbg !45
// CHECK:STDOUT: define weak_odr void @"_COp.0d7a529f95147939:core.Destroy.Core"(ptr %self) #0 !dbg !44 {
// CHECK:STDOUT: entry:
// CHECK:STDOUT: ret void, !dbg !47
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: ; Function Attrs: nounwind
// CHECK:STDOUT: define void @_CPassConstIntPtrToConstVoidPtr.Main(ptr %a) #0 !dbg !48 {
// CHECK:STDOUT: entry:
// CHECK:STDOUT: %.loc19_27.2.temp = alloca ptr, align 8, !dbg !51
// CHECK:STDOUT: %U.binding.as_type.as.ImplicitAs.impl.Convert.call = call ptr @"_CConvert.e5cf8fcbb4feaae2:ImplicitAs.0f95c9e18c91e00a.Core.e995c7ea1c3d1cc3"(ptr %a), !dbg !51
// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc19_27.2.temp), !dbg !51
// CHECK:STDOUT: store ptr %U.binding.as_type.as.ImplicitAs.impl.Convert.call, ptr %.loc19_27.2.temp, align 8, !dbg !51
// CHECK:STDOUT: %.loc19_27.4 = load ptr, ptr %.loc19_27.2.temp, align 8, !dbg !51
// CHECK:STDOUT: call void @_Z19take_const_void_ptrPKv(ptr %.loc19_27.4), !dbg !52
// CHECK:STDOUT: call void @"_COp.0d7a529f95147939:core.Destroy.Core"(ptr %.loc19_27.2.temp), !dbg !51
// CHECK:STDOUT: ret void, !dbg !53
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: ; Function Attrs: nounwind
// CHECK:STDOUT: define linkonce_odr ptr @"_CConvert.e5cf8fcbb4feaae2:ImplicitAs.0f95c9e18c91e00a.Core.66983884551336cb"(ptr %self) #0 !dbg !54 {
// CHECK:STDOUT: %1 = call ptr @"_CConvert.90961d7b1ce4f089:OptionalAs.0e326e799dad0c64.Core.7bed839a0b822504"(ptr %self), !dbg !60
// CHECK:STDOUT: ret ptr %1, !dbg !61
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
// CHECK:STDOUT: declare void @llvm.lifetime.start.p0(ptr captures(none)) #2
// CHECK:STDOUT:
// CHECK:STDOUT: ; Function Attrs: nounwind
// CHECK:STDOUT: define linkonce_odr ptr @"_CConvert.e5cf8fcbb4feaae2:ImplicitAs.0f95c9e18c91e00a.Core.295aa3526801a9d4"(ptr %self) #0 !dbg !46 {
// CHECK:STDOUT: %1 = call ptr @"_CConvert.3667eb502d1ddfa9:OptionalAs.c7a50af9bdd61b43.Core.57bd8d0c2213b1aa"(ptr %self), !dbg !49
// CHECK:STDOUT: ret ptr %1, !dbg !50
// CHECK:STDOUT: define linkonce_odr ptr @"_CConvert.e5cf8fcbb4feaae2:ImplicitAs.0f95c9e18c91e00a.Core.295aa3526801a9d4"(ptr %self) #0 !dbg !62 {
// CHECK:STDOUT: %1 = call ptr @"_CConvert.3667eb502d1ddfa9:OptionalAs.c7a50af9bdd61b43.Core.57bd8d0c2213b1aa"(ptr %self), !dbg !65
// CHECK:STDOUT: ret ptr %1, !dbg !66
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: ; Function Attrs: nounwind
// CHECK:STDOUT: define linkonce_odr ptr @"_CConvert.e5cf8fcbb4feaae2:ImplicitAs.0f95c9e18c91e00a.Core.e995c7ea1c3d1cc3"(ptr %self) #0 !dbg !51 {
// CHECK:STDOUT: %1 = call ptr @"_CConvert.3667eb502d1ddfa9:OptionalAs.c7a50af9bdd61b43.Core.02dd0be934e1c38a"(ptr %self), !dbg !54
// CHECK:STDOUT: ret ptr %1, !dbg !55
// CHECK:STDOUT: define linkonce_odr ptr @"_CConvert.e5cf8fcbb4feaae2:ImplicitAs.0f95c9e18c91e00a.Core.e995c7ea1c3d1cc3"(ptr %self) #0 !dbg !67 {
// CHECK:STDOUT: %1 = call ptr @"_CConvert.3667eb502d1ddfa9:OptionalAs.c7a50af9bdd61b43.Core.02dd0be934e1c38a"(ptr %self), !dbg !70
// CHECK:STDOUT: ret ptr %1, !dbg !71
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: ; Function Attrs: nounwind
// CHECK:STDOUT: define linkonce_odr ptr @"_CConvert.90961d7b1ce4f089:OptionalAs.0e326e799dad0c64.Core.7bed839a0b822504"(ptr %self) #0 !dbg !56 {
// CHECK:STDOUT: %1 = call ptr @_CSome.Optional.Core.7bed839a0b822504(ptr %self), !dbg !59
// CHECK:STDOUT: ret ptr %1, !dbg !60
// CHECK:STDOUT: define linkonce_odr ptr @"_CConvert.90961d7b1ce4f089:OptionalAs.0e326e799dad0c64.Core.7bed839a0b822504"(ptr %self) #0 !dbg !72 {
// CHECK:STDOUT: %1 = call ptr @_CSome.Optional.Core.7bed839a0b822504(ptr %self), !dbg !75
// CHECK:STDOUT: ret ptr %1, !dbg !76
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: ; Function Attrs: nounwind
// CHECK:STDOUT: define linkonce_odr ptr @"_CConvert.3667eb502d1ddfa9:OptionalAs.c7a50af9bdd61b43.Core.57bd8d0c2213b1aa"(ptr %self) #0 !dbg !61 {
// CHECK:STDOUT: %temp = alloca ptr, align 8, !dbg !64
// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %temp), !dbg !64
// CHECK:STDOUT: store ptr %self, ptr %temp, align 8, !dbg !64
// CHECK:STDOUT: %1 = load ptr, ptr %temp, align 8, !dbg !64
// CHECK:STDOUT: %2 = call ptr @_CSome.Optional.Core.7bed839a0b822504(ptr %1), !dbg !65
// CHECK:STDOUT: ret ptr %2, !dbg !66
// CHECK:STDOUT: define linkonce_odr ptr @"_CConvert.3667eb502d1ddfa9:OptionalAs.c7a50af9bdd61b43.Core.57bd8d0c2213b1aa"(ptr %self) #0 !dbg !77 {
// CHECK:STDOUT: %temp = alloca ptr, align 8, !dbg !80
// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %temp), !dbg !80
// CHECK:STDOUT: store ptr %self, ptr %temp, align 8, !dbg !80
// CHECK:STDOUT: %1 = load ptr, ptr %temp, align 8, !dbg !80
// CHECK:STDOUT: %2 = call ptr @_CSome.Optional.Core.7bed839a0b822504(ptr %1), !dbg !81
// CHECK:STDOUT: ret ptr %2, !dbg !82
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: ; Function Attrs: nounwind
// CHECK:STDOUT: define linkonce_odr ptr @"_CConvert.3667eb502d1ddfa9:OptionalAs.c7a50af9bdd61b43.Core.02dd0be934e1c38a"(ptr %self) #0 !dbg !67 {
// CHECK:STDOUT: %temp = alloca ptr, align 8, !dbg !70
// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %temp), !dbg !70
// CHECK:STDOUT: %1 = call ptr @"_CConvert:thunk.e8f8f92d3d08d149:ImplicitAs.ffd58aeb29886b72.Core.b88d1103f417c6d4"(ptr %self), !dbg !70
// CHECK:STDOUT: store ptr %1, ptr %temp, align 8, !dbg !70
// CHECK:STDOUT: %2 = load ptr, ptr %temp, align 8, !dbg !70
// CHECK:STDOUT: %3 = call ptr @_CSome.Optional.Core.9544e72a46e24ed6(ptr %2), !dbg !71
// CHECK:STDOUT: ret ptr %3, !dbg !72
// CHECK:STDOUT: define linkonce_odr ptr @"_CConvert.3667eb502d1ddfa9:OptionalAs.c7a50af9bdd61b43.Core.02dd0be934e1c38a"(ptr %self) #0 !dbg !83 {
// CHECK:STDOUT: %temp = alloca ptr, align 8, !dbg !86
// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %temp), !dbg !86
// CHECK:STDOUT: %1 = call ptr @"_CConvert:thunk.e8f8f92d3d08d149:ImplicitAs.ffd58aeb29886b72.Core.b88d1103f417c6d4"(ptr %self), !dbg !86
// CHECK:STDOUT: store ptr %1, ptr %temp, align 8, !dbg !86
// CHECK:STDOUT: %2 = load ptr, ptr %temp, align 8, !dbg !86
// CHECK:STDOUT: %3 = call ptr @_CSome.Optional.Core.9544e72a46e24ed6(ptr %2), !dbg !87
// CHECK:STDOUT: ret ptr %3, !dbg !88
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: ; Function Attrs: nounwind
// CHECK:STDOUT: define linkonce_odr ptr @_CSome.Optional.Core.7bed839a0b822504(ptr %value) #0 !dbg !73 {
// CHECK:STDOUT: %1 = call ptr @"_CSome.e8f8f92d3d08d149:OptionalStorage.Core.a3238f3d1f6ba299"(ptr %value), !dbg !76
// CHECK:STDOUT: ret ptr %1, !dbg !77
// CHECK:STDOUT: define linkonce_odr ptr @_CSome.Optional.Core.7bed839a0b822504(ptr %value) #0 !dbg !89 {
// CHECK:STDOUT: %1 = call ptr @"_CSome.e8f8f92d3d08d149:OptionalStorage.Core.a3238f3d1f6ba299"(ptr %value), !dbg !92
// CHECK:STDOUT: ret ptr %1, !dbg !93
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: ; Function Attrs: alwaysinline nounwind
// CHECK:STDOUT: define linkonce_odr ptr @"_CConvert:thunk.e8f8f92d3d08d149:ImplicitAs.ffd58aeb29886b72.Core.b88d1103f417c6d4"(ptr %self) #3 !dbg !78 {
// CHECK:STDOUT: ret ptr %self, !dbg !82
// CHECK:STDOUT: define linkonce_odr ptr @"_CConvert:thunk.e8f8f92d3d08d149:ImplicitAs.ffd58aeb29886b72.Core.b88d1103f417c6d4"(ptr %self) #3 !dbg !94 {
// CHECK:STDOUT: ret ptr %self, !dbg !98
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: ; Function Attrs: nounwind
// CHECK:STDOUT: define linkonce_odr ptr @_CSome.Optional.Core.9544e72a46e24ed6(ptr %value) #0 !dbg !83 {
// CHECK:STDOUT: %1 = call ptr @"_CSome.e8f8f92d3d08d149:OptionalStorage.Core.2e8a3baa837dcd9f"(ptr %value), !dbg !86
// CHECK:STDOUT: ret ptr %1, !dbg !87
// CHECK:STDOUT: define linkonce_odr ptr @_CSome.Optional.Core.9544e72a46e24ed6(ptr %value) #0 !dbg !99 {
// CHECK:STDOUT: %1 = call ptr @"_CSome.e8f8f92d3d08d149:OptionalStorage.Core.2e8a3baa837dcd9f"(ptr %value), !dbg !102
// CHECK:STDOUT: ret ptr %1, !dbg !103
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: ; Function Attrs: nounwind
// CHECK:STDOUT: define linkonce_odr ptr @"_CSome.e8f8f92d3d08d149:OptionalStorage.Core.a3238f3d1f6ba299"(ptr %self) #0 !dbg !88 {
// CHECK:STDOUT: %1 = alloca ptr, align 8, !dbg !91
// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %1), !dbg !91
// CHECK:STDOUT: store ptr poison, ptr %1, align 8, !dbg !91
// CHECK:STDOUT: store ptr %self, ptr %1, align 8, !dbg !92
// CHECK:STDOUT: %2 = load ptr, ptr %1, align 8, !dbg !93
// CHECK:STDOUT: ret ptr %2, !dbg !94
// CHECK:STDOUT: define linkonce_odr ptr @"_CSome.e8f8f92d3d08d149:OptionalStorage.Core.a3238f3d1f6ba299"(ptr %self) #0 !dbg !104 {
// CHECK:STDOUT: %1 = alloca ptr, align 8, !dbg !107
// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %1), !dbg !107
// CHECK:STDOUT: store ptr poison, ptr %1, align 8, !dbg !107
// CHECK:STDOUT: store ptr %self, ptr %1, align 8, !dbg !108
// CHECK:STDOUT: %2 = load ptr, ptr %1, align 8, !dbg !109
// CHECK:STDOUT: call void @"_COp.39ca70f0f5ff2105:core.Destroy.Core"(ptr %1), !dbg !107
// CHECK:STDOUT: ret ptr %2, !dbg !110
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: ; Function Attrs: nounwind
// CHECK:STDOUT: define linkonce_odr ptr @"_CSome.e8f8f92d3d08d149:OptionalStorage.Core.2e8a3baa837dcd9f"(ptr %self) #0 !dbg !95 {
// CHECK:STDOUT: %1 = alloca ptr, align 8, !dbg !98
// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %1), !dbg !98
// CHECK:STDOUT: store ptr poison, ptr %1, align 8, !dbg !98
// CHECK:STDOUT: store ptr %self, ptr %1, align 8, !dbg !99
// CHECK:STDOUT: %2 = load ptr, ptr %1, align 8, !dbg !100
// CHECK:STDOUT: ret ptr %2, !dbg !101
// CHECK:STDOUT: define linkonce_odr ptr @"_CSome.e8f8f92d3d08d149:OptionalStorage.Core.2e8a3baa837dcd9f"(ptr %self) #0 !dbg !111 {
// CHECK:STDOUT: %1 = alloca ptr, align 8, !dbg !114
// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %1), !dbg !114
// CHECK:STDOUT: store ptr poison, ptr %1, align 8, !dbg !114
// CHECK:STDOUT: store ptr %self, ptr %1, align 8, !dbg !115
// CHECK:STDOUT: %2 = load ptr, ptr %1, align 8, !dbg !116
// CHECK:STDOUT: call void @"_COp.02b26c7ebd9c0872:core.Destroy.Core"(ptr %1), !dbg !114
// CHECK:STDOUT: ret ptr %2, !dbg !117
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: ; uselistorder directives
@@ -232,88 +262,104 @@ fn ConvertFromConstVoidPtr(p: const Cpp.void*) -> const i32* {
// CHECK:STDOUT: !17 = !DILocation(line: 7, column: 21, scope: !11)
// CHECK:STDOUT: !18 = !DILocation(line: 7, column: 3, scope: !11)
// CHECK:STDOUT: !19 = !DILocation(line: 6, column: 1, scope: !11)
// CHECK:STDOUT: !20 = distinct !DISubprogram(name: "PassIntPtr", linkageName: "_CPassIntPtr.Main", scope: null, file: !6, line: 10, type: !12, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !21)
// CHECK:STDOUT: !20 = distinct !DISubprogram(name: "Op", linkageName: "_COp.39ca70f0f5ff2105:core.Destroy.Core", scope: null, file: !6, line: 7, type: !12, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !21)
// CHECK:STDOUT: !21 = !{!22}
// CHECK:STDOUT: !22 = !DILocalVariable(arg: 1, scope: !20, type: !14)
// CHECK:STDOUT: !23 = !DILocation(line: 11, column: 21, scope: !20)
// CHECK:STDOUT: !24 = !DILocation(line: 11, column: 3, scope: !20)
// CHECK:STDOUT: !25 = !DILocation(line: 10, column: 1, scope: !20)
// CHECK:STDOUT: !26 = distinct !DISubprogram(name: "PassIntPtrToConstVoidPtr", linkageName: "_CPassIntPtrToConstVoidPtr.Main", scope: null, file: !6, line: 14, type: !12, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !27)
// CHECK:STDOUT: !27 = !{!28}
// CHECK:STDOUT: !28 = !DILocalVariable(arg: 1, scope: !26, type: !14)
// CHECK:STDOUT: !29 = !DILocation(line: 15, column: 27, scope: !26)
// CHECK:STDOUT: !30 = !DILocation(line: 15, column: 3, scope: !26)
// CHECK:STDOUT: !31 = !DILocation(line: 14, column: 1, scope: !26)
// CHECK:STDOUT: !32 = distinct !DISubprogram(name: "PassConstIntPtrToConstVoidPtr", linkageName: "_CPassConstIntPtrToConstVoidPtr.Main", scope: null, file: !6, line: 18, type: !12, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !33)
// CHECK:STDOUT: !33 = !{!34}
// CHECK:STDOUT: !34 = !DILocalVariable(arg: 1, scope: !32, type: !14)
// CHECK:STDOUT: !35 = !DILocation(line: 19, column: 27, scope: !32)
// CHECK:STDOUT: !36 = !DILocation(line: 19, column: 3, scope: !32)
// CHECK:STDOUT: !37 = !DILocation(line: 18, column: 1, scope: !32)
// CHECK:STDOUT: !38 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.e5cf8fcbb4feaae2:ImplicitAs.0f95c9e18c91e00a.Core.66983884551336cb", scope: null, file: !39, line: 96, type: !40, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !42)
// CHECK:STDOUT: !39 = !DIFile(filename: "{{.*}}/prelude/types/optional.carbon", directory: "")
// CHECK:STDOUT: !40 = !DISubroutineType(types: !41)
// CHECK:STDOUT: !41 = !{!14, !14}
// CHECK:STDOUT: !42 = !{!43}
// CHECK:STDOUT: !43 = !DILocalVariable(arg: 1, scope: !38, type: !14)
// CHECK:STDOUT: !44 = !DILocation(line: 97, column: 12, scope: !38)
// CHECK:STDOUT: !45 = !DILocation(line: 97, column: 5, scope: !38)
// CHECK:STDOUT: !46 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.e5cf8fcbb4feaae2:ImplicitAs.0f95c9e18c91e00a.Core.295aa3526801a9d4", scope: null, file: !39, line: 96, type: !40, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !47)
// CHECK:STDOUT: !47 = !{!48}
// CHECK:STDOUT: !48 = !DILocalVariable(arg: 1, scope: !46, type: !14)
// CHECK:STDOUT: !49 = !DILocation(line: 97, column: 12, scope: !46)
// CHECK:STDOUT: !50 = !DILocation(line: 97, column: 5, scope: !46)
// CHECK:STDOUT: !51 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.e5cf8fcbb4feaae2:ImplicitAs.0f95c9e18c91e00a.Core.e995c7ea1c3d1cc3", scope: null, file: !39, line: 96, type: !40, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !52)
// CHECK:STDOUT: !52 = !{!53}
// CHECK:STDOUT: !53 = !DILocalVariable(arg: 1, scope: !51, type: !14)
// CHECK:STDOUT: !54 = !DILocation(line: 97, column: 12, scope: !51)
// CHECK:STDOUT: !55 = !DILocation(line: 97, column: 5, scope: !51)
// CHECK:STDOUT: !56 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.90961d7b1ce4f089:OptionalAs.0e326e799dad0c64.Core.7bed839a0b822504", scope: null, file: !39, line: 71, type: !40, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !57)
// CHECK:STDOUT: !57 = !{!58}
// CHECK:STDOUT: !58 = !DILocalVariable(arg: 1, scope: !56, type: !14)
// CHECK:STDOUT: !59 = !DILocation(line: 72, column: 12, scope: !56)
// CHECK:STDOUT: !60 = !DILocation(line: 72, column: 5, scope: !56)
// CHECK:STDOUT: !61 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.3667eb502d1ddfa9:OptionalAs.c7a50af9bdd61b43.Core.57bd8d0c2213b1aa", scope: null, file: !39, line: 78, type: !40, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !62)
// CHECK:STDOUT: !62 = !{!63}
// CHECK:STDOUT: !63 = !DILocalVariable(arg: 1, scope: !61, type: !14)
// CHECK:STDOUT: !64 = !DILocation(line: 79, column: 29, scope: !61)
// CHECK:STDOUT: !65 = !DILocation(line: 79, column: 12, scope: !61)
// CHECK:STDOUT: !66 = !DILocation(line: 79, column: 5, scope: !61)
// CHECK:STDOUT: !67 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.3667eb502d1ddfa9:OptionalAs.c7a50af9bdd61b43.Core.02dd0be934e1c38a", scope: null, file: !39, line: 78, type: !40, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !68)
// CHECK:STDOUT: !23 = !DILocation(line: 7, column: 21, scope: !20)
// CHECK:STDOUT: !24 = distinct !DISubprogram(name: "Op", linkageName: "_COp.ee91ab4ecda32839:core.Destroy.Core", scope: null, file: !6, line: 7, type: !12, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !25)
// CHECK:STDOUT: !25 = !{!26}
// CHECK:STDOUT: !26 = !DILocalVariable(arg: 1, scope: !24, type: !14)
// CHECK:STDOUT: !27 = !DILocation(line: 7, column: 21, scope: !24)
// CHECK:STDOUT: !28 = distinct !DISubprogram(name: "PassIntPtr", linkageName: "_CPassIntPtr.Main", scope: null, file: !6, line: 10, type: !12, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !29)
// CHECK:STDOUT: !29 = !{!30}
// CHECK:STDOUT: !30 = !DILocalVariable(arg: 1, scope: !28, type: !14)
// CHECK:STDOUT: !31 = !DILocation(line: 11, column: 21, scope: !28)
// CHECK:STDOUT: !32 = !DILocation(line: 11, column: 3, scope: !28)
// CHECK:STDOUT: !33 = !DILocation(line: 10, column: 1, scope: !28)
// CHECK:STDOUT: !34 = distinct !DISubprogram(name: "PassIntPtrToConstVoidPtr", linkageName: "_CPassIntPtrToConstVoidPtr.Main", scope: null, file: !6, line: 14, type: !12, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !35)
// CHECK:STDOUT: !35 = !{!36}
// CHECK:STDOUT: !36 = !DILocalVariable(arg: 1, scope: !34, type: !14)
// CHECK:STDOUT: !37 = !DILocation(line: 15, column: 27, scope: !34)
// CHECK:STDOUT: !38 = !DILocation(line: 15, column: 3, scope: !34)
// CHECK:STDOUT: !39 = !DILocation(line: 14, column: 1, scope: !34)
// CHECK:STDOUT: !40 = distinct !DISubprogram(name: "Op", linkageName: "_COp.02b26c7ebd9c0872:core.Destroy.Core", scope: null, file: !6, line: 15, type: !12, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !41)
// CHECK:STDOUT: !41 = !{!42}
// CHECK:STDOUT: !42 = !DILocalVariable(arg: 1, scope: !40, type: !14)
// CHECK:STDOUT: !43 = !DILocation(line: 15, column: 27, scope: !40)
// CHECK:STDOUT: !44 = distinct !DISubprogram(name: "Op", linkageName: "_COp.0d7a529f95147939:core.Destroy.Core", scope: null, file: !6, line: 15, type: !12, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !45)
// CHECK:STDOUT: !45 = !{!46}
// CHECK:STDOUT: !46 = !DILocalVariable(arg: 1, scope: !44, type: !14)
// CHECK:STDOUT: !47 = !DILocation(line: 15, column: 27, scope: !44)
// CHECK:STDOUT: !48 = distinct !DISubprogram(name: "PassConstIntPtrToConstVoidPtr", linkageName: "_CPassConstIntPtrToConstVoidPtr.Main", scope: null, file: !6, line: 18, type: !12, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !49)
// CHECK:STDOUT: !49 = !{!50}
// CHECK:STDOUT: !50 = !DILocalVariable(arg: 1, scope: !48, type: !14)
// CHECK:STDOUT: !51 = !DILocation(line: 19, column: 27, scope: !48)
// CHECK:STDOUT: !52 = !DILocation(line: 19, column: 3, scope: !48)
// CHECK:STDOUT: !53 = !DILocation(line: 18, column: 1, scope: !48)
// CHECK:STDOUT: !54 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.e5cf8fcbb4feaae2:ImplicitAs.0f95c9e18c91e00a.Core.66983884551336cb", scope: null, file: !55, line: 96, type: !56, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !58)
// CHECK:STDOUT: !55 = !DIFile(filename: "{{.*}}/prelude/types/optional.carbon", directory: "")
// CHECK:STDOUT: !56 = !DISubroutineType(types: !57)
// CHECK:STDOUT: !57 = !{!14, !14}
// CHECK:STDOUT: !58 = !{!59}
// CHECK:STDOUT: !59 = !DILocalVariable(arg: 1, scope: !54, type: !14)
// CHECK:STDOUT: !60 = !DILocation(line: 97, column: 12, scope: !54)
// CHECK:STDOUT: !61 = !DILocation(line: 97, column: 5, scope: !54)
// CHECK:STDOUT: !62 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.e5cf8fcbb4feaae2:ImplicitAs.0f95c9e18c91e00a.Core.295aa3526801a9d4", scope: null, file: !55, line: 96, type: !56, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !63)
// CHECK:STDOUT: !63 = !{!64}
// CHECK:STDOUT: !64 = !DILocalVariable(arg: 1, scope: !62, type: !14)
// CHECK:STDOUT: !65 = !DILocation(line: 97, column: 12, scope: !62)
// CHECK:STDOUT: !66 = !DILocation(line: 97, column: 5, scope: !62)
// CHECK:STDOUT: !67 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.e5cf8fcbb4feaae2:ImplicitAs.0f95c9e18c91e00a.Core.e995c7ea1c3d1cc3", scope: null, file: !55, line: 96, type: !56, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !68)
// CHECK:STDOUT: !68 = !{!69}
// CHECK:STDOUT: !69 = !DILocalVariable(arg: 1, scope: !67, type: !14)
// CHECK:STDOUT: !70 = !DILocation(line: 79, column: 29, scope: !67)
// CHECK:STDOUT: !71 = !DILocation(line: 79, column: 12, scope: !67)
// CHECK:STDOUT: !72 = !DILocation(line: 79, column: 5, scope: !67)
// CHECK:STDOUT: !73 = distinct !DISubprogram(name: "Some", linkageName: "_CSome.Optional.Core.7bed839a0b822504", scope: null, file: !39, line: 30, type: !40, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !74)
// CHECK:STDOUT: !74 = !{!75}
// CHECK:STDOUT: !75 = !DILocalVariable(arg: 1, scope: !73, type: !14)
// CHECK:STDOUT: !76 = !DILocation(line: 31, column: 12, scope: !73)
// CHECK:STDOUT: !77 = !DILocation(line: 31, column: 5, scope: !73)
// CHECK:STDOUT: !78 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert:thunk.e8f8f92d3d08d149:ImplicitAs.ffd58aeb29886b72.Core.b88d1103f417c6d4", scope: null, file: !79, line: 40, type: !40, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !80)
// CHECK:STDOUT: !79 = !DIFile(filename: "{{.*}}/prelude/types/cpp/void.carbon", directory: "")
// CHECK:STDOUT: !80 = !{!81}
// CHECK:STDOUT: !81 = !DILocalVariable(arg: 1, scope: !78, type: !14)
// CHECK:STDOUT: !82 = !DILocation(line: 40, column: 3, scope: !78)
// CHECK:STDOUT: !83 = distinct !DISubprogram(name: "Some", linkageName: "_CSome.Optional.Core.9544e72a46e24ed6", scope: null, file: !39, line: 30, type: !40, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !84)
// CHECK:STDOUT: !70 = !DILocation(line: 97, column: 12, scope: !67)
// CHECK:STDOUT: !71 = !DILocation(line: 97, column: 5, scope: !67)
// CHECK:STDOUT: !72 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.90961d7b1ce4f089:OptionalAs.0e326e799dad0c64.Core.7bed839a0b822504", scope: null, file: !55, line: 71, type: !56, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !73)
// CHECK:STDOUT: !73 = !{!74}
// CHECK:STDOUT: !74 = !DILocalVariable(arg: 1, scope: !72, type: !14)
// CHECK:STDOUT: !75 = !DILocation(line: 72, column: 12, scope: !72)
// CHECK:STDOUT: !76 = !DILocation(line: 72, column: 5, scope: !72)
// CHECK:STDOUT: !77 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.3667eb502d1ddfa9:OptionalAs.c7a50af9bdd61b43.Core.57bd8d0c2213b1aa", scope: null, file: !55, line: 78, type: !56, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !78)
// CHECK:STDOUT: !78 = !{!79}
// CHECK:STDOUT: !79 = !DILocalVariable(arg: 1, scope: !77, type: !14)
// CHECK:STDOUT: !80 = !DILocation(line: 79, column: 29, scope: !77)
// CHECK:STDOUT: !81 = !DILocation(line: 79, column: 12, scope: !77)
// CHECK:STDOUT: !82 = !DILocation(line: 79, column: 5, scope: !77)
// CHECK:STDOUT: !83 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.3667eb502d1ddfa9:OptionalAs.c7a50af9bdd61b43.Core.02dd0be934e1c38a", scope: null, file: !55, line: 78, type: !56, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !84)
// CHECK:STDOUT: !84 = !{!85}
// CHECK:STDOUT: !85 = !DILocalVariable(arg: 1, scope: !83, type: !14)
// CHECK:STDOUT: !86 = !DILocation(line: 31, column: 12, scope: !83)
// CHECK:STDOUT: !87 = !DILocation(line: 31, column: 5, scope: !83)
// CHECK:STDOUT: !88 = distinct !DISubprogram(name: "Some", linkageName: "_CSome.e8f8f92d3d08d149:OptionalStorage.Core.a3238f3d1f6ba299", scope: null, file: !39, line: 150, type: !40, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !89)
// CHECK:STDOUT: !89 = !{!90}
// CHECK:STDOUT: !90 = !DILocalVariable(arg: 1, scope: !88, type: !14)
// CHECK:STDOUT: !91 = !DILocation(line: 151, column: 14, scope: !88)
// CHECK:STDOUT: !92 = !DILocation(line: 153, column: 5, scope: !88)
// CHECK:STDOUT: !93 = !DILocation(line: 151, column: 18, scope: !88)
// CHECK:STDOUT: !94 = !DILocation(line: 154, column: 5, scope: !88)
// CHECK:STDOUT: !95 = distinct !DISubprogram(name: "Some", linkageName: "_CSome.e8f8f92d3d08d149:OptionalStorage.Core.2e8a3baa837dcd9f", scope: null, file: !39, line: 150, type: !40, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !96)
// CHECK:STDOUT: !86 = !DILocation(line: 79, column: 29, scope: !83)
// CHECK:STDOUT: !87 = !DILocation(line: 79, column: 12, scope: !83)
// CHECK:STDOUT: !88 = !DILocation(line: 79, column: 5, scope: !83)
// CHECK:STDOUT: !89 = distinct !DISubprogram(name: "Some", linkageName: "_CSome.Optional.Core.7bed839a0b822504", scope: null, file: !55, line: 30, type: !56, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !90)
// CHECK:STDOUT: !90 = !{!91}
// CHECK:STDOUT: !91 = !DILocalVariable(arg: 1, scope: !89, type: !14)
// CHECK:STDOUT: !92 = !DILocation(line: 31, column: 12, scope: !89)
// CHECK:STDOUT: !93 = !DILocation(line: 31, column: 5, scope: !89)
// CHECK:STDOUT: !94 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert:thunk.e8f8f92d3d08d149:ImplicitAs.ffd58aeb29886b72.Core.b88d1103f417c6d4", scope: null, file: !95, line: 40, type: !56, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !96)
// CHECK:STDOUT: !95 = !DIFile(filename: "{{.*}}/prelude/types/cpp/void.carbon", directory: "")
// CHECK:STDOUT: !96 = !{!97}
// CHECK:STDOUT: !97 = !DILocalVariable(arg: 1, scope: !95, type: !14)
// CHECK:STDOUT: !98 = !DILocation(line: 151, column: 14, scope: !95)
// CHECK:STDOUT: !99 = !DILocation(line: 153, column: 5, scope: !95)
// CHECK:STDOUT: !100 = !DILocation(line: 151, column: 18, scope: !95)
// CHECK:STDOUT: !101 = !DILocation(line: 154, column: 5, scope: !95)
// CHECK:STDOUT: !97 = !DILocalVariable(arg: 1, scope: !94, type: !14)
// CHECK:STDOUT: !98 = !DILocation(line: 40, column: 3, scope: !94)
// CHECK:STDOUT: !99 = distinct !DISubprogram(name: "Some", linkageName: "_CSome.Optional.Core.9544e72a46e24ed6", scope: null, file: !55, line: 30, type: !56, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !100)
// CHECK:STDOUT: !100 = !{!101}
// CHECK:STDOUT: !101 = !DILocalVariable(arg: 1, scope: !99, type: !14)
// CHECK:STDOUT: !102 = !DILocation(line: 31, column: 12, scope: !99)
// CHECK:STDOUT: !103 = !DILocation(line: 31, column: 5, scope: !99)
// CHECK:STDOUT: !104 = distinct !DISubprogram(name: "Some", linkageName: "_CSome.e8f8f92d3d08d149:OptionalStorage.Core.a3238f3d1f6ba299", scope: null, file: !55, line: 150, type: !56, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !105)
// CHECK:STDOUT: !105 = !{!106}
// CHECK:STDOUT: !106 = !DILocalVariable(arg: 1, scope: !104, type: !14)
// CHECK:STDOUT: !107 = !DILocation(line: 151, column: 14, scope: !104)
// CHECK:STDOUT: !108 = !DILocation(line: 153, column: 5, scope: !104)
// CHECK:STDOUT: !109 = !DILocation(line: 151, column: 18, scope: !104)
// CHECK:STDOUT: !110 = !DILocation(line: 154, column: 5, scope: !104)
// CHECK:STDOUT: !111 = distinct !DISubprogram(name: "Some", linkageName: "_CSome.e8f8f92d3d08d149:OptionalStorage.Core.2e8a3baa837dcd9f", scope: null, file: !55, line: 150, type: !56, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !112)
// CHECK:STDOUT: !112 = !{!113}
// CHECK:STDOUT: !113 = !DILocalVariable(arg: 1, scope: !111, type: !14)
// CHECK:STDOUT: !114 = !DILocation(line: 151, column: 14, scope: !111)
// CHECK:STDOUT: !115 = !DILocation(line: 153, column: 5, scope: !111)
// CHECK:STDOUT: !116 = !DILocation(line: 151, column: 18, scope: !111)
// CHECK:STDOUT: !117 = !DILocation(line: 154, column: 5, scope: !111)
// CHECK:STDOUT: ; ModuleID = 'receive.carbon'
// CHECK:STDOUT: source_filename = "receive.carbon"
// CHECK:STDOUT: target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"