mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 07:31:04 +01:00
Classify classes with no struct fields as trivially destructible (#7846)
This commit is contained in:
+87
-120
@@ -101,18 +101,11 @@ fn InitLet() {
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: ; Function Attrs: nounwind
|
||||
// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.08d9e38b928ba575:core.Destroy.Core"(ptr %self) #0 !dbg !35 {
|
||||
// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core"(ptr %self) #0 !dbg !35 {
|
||||
// CHECK:STDOUT: entry:
|
||||
// CHECK:STDOUT: ret void, !dbg !37
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: ; Function Attrs: nounwind
|
||||
// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core"(ptr %self) #0 !dbg !39 {
|
||||
// CHECK:STDOUT: entry:
|
||||
// CHECK:STDOUT: call void @"_CSubobjectDestroy.08d9e38b928ba575:core.Destroy.Core"(ptr %self), !dbg !41
|
||||
// CHECK:STDOUT: ret void, !dbg !41
|
||||
// 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)) #1
|
||||
// CHECK:STDOUT:
|
||||
@@ -144,14 +137,10 @@ fn InitLet() {
|
||||
// CHECK:STDOUT: !32 = !DILocalVariable(arg: 1, scope: !31, type: !16)
|
||||
// CHECK:STDOUT: !33 = !DILocation(line: 12, column: 5, scope: !31)
|
||||
// CHECK:STDOUT: !34 = !{!32}
|
||||
// CHECK:STDOUT: !35 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.08d9e38b928ba575:core.Destroy.Core", scope: null, file: !14, line: 12, type: !18, spFlags: DISPFlagDefinition, unit: !15, retainedNodes: !38)
|
||||
// CHECK:STDOUT: !35 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core", scope: null, file: !14, line: 12, type: !18, spFlags: DISPFlagDefinition, unit: !15, retainedNodes: !38)
|
||||
// CHECK:STDOUT: !36 = !DILocalVariable(arg: 1, scope: !35, type: !16)
|
||||
// CHECK:STDOUT: !37 = !DILocation(line: 12, column: 5, scope: !35)
|
||||
// CHECK:STDOUT: !38 = !{!36}
|
||||
// CHECK:STDOUT: !39 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core", scope: null, file: !14, line: 12, type: !18, spFlags: DISPFlagDefinition, unit: !15, retainedNodes: !42)
|
||||
// CHECK:STDOUT: !40 = !DILocalVariable(arg: 1, scope: !39, type: !16)
|
||||
// CHECK:STDOUT: !41 = !DILocation(line: 12, column: 5, scope: !39)
|
||||
// CHECK:STDOUT: !42 = !{!40}
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: ; ---
|
||||
// CHECK:STDOUT: ; ModuleID = 'var_param.carbon'
|
||||
@@ -160,44 +149,37 @@ fn InitLet() {
|
||||
// CHECK:STDOUT: @C.val.loc6 = internal constant {} zeroinitializer
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: ; Function Attrs: nounwind
|
||||
// CHECK:STDOUT: define void @_CF.Main(ptr %_) #0 !dbg !45 {
|
||||
// CHECK:STDOUT: define void @_CF.Main(ptr %_) #0 !dbg !41 {
|
||||
// CHECK:STDOUT: entry:
|
||||
// CHECK:STDOUT: ret void, !dbg !49
|
||||
// CHECK:STDOUT: ret void, !dbg !45
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: declare void @_CG.Main()
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: ; Function Attrs: nounwind
|
||||
// CHECK:STDOUT: define void @_CCallF.Main() #0 !dbg !51 {
|
||||
// CHECK:STDOUT: define void @_CCallF.Main() #0 !dbg !47 {
|
||||
// CHECK:STDOUT: entry:
|
||||
// CHECK:STDOUT: %_.var = alloca {}, align 1, !dbg !52
|
||||
// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !52
|
||||
// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %_.var, ptr align 1 @C.val.loc6, i64 0, i1 false), !dbg !52
|
||||
// CHECK:STDOUT: call void @_CF.Main(ptr %_.var), !dbg !53
|
||||
// CHECK:STDOUT: call void @"_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core"(ptr %_.var), !dbg !52
|
||||
// CHECK:STDOUT: call void @_CG.Main(), !dbg !54
|
||||
// CHECK:STDOUT: ret void, !dbg !55
|
||||
// CHECK:STDOUT: %_.var = alloca {}, align 1, !dbg !48
|
||||
// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !48
|
||||
// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %_.var, ptr align 1 @C.val.loc6, i64 0, i1 false), !dbg !48
|
||||
// CHECK:STDOUT: call void @_CF.Main(ptr %_.var), !dbg !49
|
||||
// CHECK:STDOUT: call void @"_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core"(ptr %_.var), !dbg !48
|
||||
// CHECK:STDOUT: call void @_CG.Main(), !dbg !50
|
||||
// CHECK:STDOUT: ret void, !dbg !51
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: ; Function Attrs: nounwind
|
||||
// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.cb8adced19392b99:core.Destroy.Core"(ptr %self) #0 !dbg !56 {
|
||||
// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.cb8adced19392b99:core.Destroy.Core"(ptr %self) #0 !dbg !52 {
|
||||
// CHECK:STDOUT: entry:
|
||||
// CHECK:STDOUT: ret void, !dbg !54
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: ; Function Attrs: nounwind
|
||||
// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core"(ptr %self) #0 !dbg !56 {
|
||||
// CHECK:STDOUT: entry:
|
||||
// CHECK:STDOUT: ret void, !dbg !58
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: ; Function Attrs: nounwind
|
||||
// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.08d9e38b928ba575:core.Destroy.Core"(ptr %self) #0 !dbg !60 {
|
||||
// CHECK:STDOUT: entry:
|
||||
// CHECK:STDOUT: ret void, !dbg !62
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: ; Function Attrs: nounwind
|
||||
// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core"(ptr %self) #0 !dbg !64 {
|
||||
// CHECK:STDOUT: entry:
|
||||
// CHECK:STDOUT: call void @"_CSubobjectDestroy.08d9e38b928ba575:core.Destroy.Core"(ptr %self), !dbg !66
|
||||
// CHECK:STDOUT: ret void, !dbg !66
|
||||
// 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)) #1
|
||||
// CHECK:STDOUT:
|
||||
@@ -207,7 +189,7 @@ fn InitLet() {
|
||||
// CHECK:STDOUT: attributes #0 = { nounwind }
|
||||
// CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !llvm.dbg.cu = !{!44}
|
||||
// CHECK:STDOUT: !llvm.dbg.cu = !{!40}
|
||||
// CHECK:STDOUT: !llvm.module.flags = !{!2, !3}
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5}
|
||||
@@ -217,29 +199,25 @@ fn InitLet() {
|
||||
// CHECK:STDOUT: !18 = !DISubroutineType(types: !17)
|
||||
// CHECK:STDOUT: !19 = !{null}
|
||||
// CHECK:STDOUT: !20 = !DISubroutineType(types: !19)
|
||||
// CHECK:STDOUT: !43 = !DIFile(filename: "var_param.carbon", directory: "")
|
||||
// CHECK:STDOUT: !44 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !43, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug)
|
||||
// CHECK:STDOUT: !45 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !43, line: 6, type: !18, spFlags: DISPFlagDefinition, unit: !44, retainedNodes: !50)
|
||||
// CHECK:STDOUT: !46 = !DILocalVariable(arg: 1, scope: !45, type: !16)
|
||||
// CHECK:STDOUT: !49 = !DILocation(line: 6, column: 1, scope: !45)
|
||||
// CHECK:STDOUT: !50 = !{!46}
|
||||
// CHECK:STDOUT: !51 = distinct !DISubprogram(name: "CallF", linkageName: "_CCallF.Main", scope: null, file: !43, line: 11, type: !20, spFlags: DISPFlagDefinition, unit: !44)
|
||||
// CHECK:STDOUT: !52 = !DILocation(line: 6, column: 6, scope: !51)
|
||||
// CHECK:STDOUT: !53 = !DILocation(line: 12, column: 3, scope: !51)
|
||||
// CHECK:STDOUT: !54 = !DILocation(line: 13, column: 3, scope: !51)
|
||||
// CHECK:STDOUT: !55 = !DILocation(line: 11, column: 1, scope: !51)
|
||||
// CHECK:STDOUT: !56 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.cb8adced19392b99:core.Destroy.Core", scope: null, file: !43, line: 6, type: !18, spFlags: DISPFlagDefinition, unit: !44, retainedNodes: !59)
|
||||
// CHECK:STDOUT: !39 = !DIFile(filename: "var_param.carbon", directory: "")
|
||||
// CHECK:STDOUT: !40 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !39, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug)
|
||||
// CHECK:STDOUT: !41 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !39, line: 6, type: !18, spFlags: DISPFlagDefinition, unit: !40, retainedNodes: !46)
|
||||
// CHECK:STDOUT: !42 = !DILocalVariable(arg: 1, scope: !41, type: !16)
|
||||
// CHECK:STDOUT: !45 = !DILocation(line: 6, column: 1, scope: !41)
|
||||
// CHECK:STDOUT: !46 = !{!42}
|
||||
// CHECK:STDOUT: !47 = distinct !DISubprogram(name: "CallF", linkageName: "_CCallF.Main", scope: null, file: !39, line: 11, type: !20, spFlags: DISPFlagDefinition, unit: !40)
|
||||
// CHECK:STDOUT: !48 = !DILocation(line: 6, column: 6, scope: !47)
|
||||
// CHECK:STDOUT: !49 = !DILocation(line: 12, column: 3, scope: !47)
|
||||
// CHECK:STDOUT: !50 = !DILocation(line: 13, column: 3, scope: !47)
|
||||
// CHECK:STDOUT: !51 = !DILocation(line: 11, column: 1, scope: !47)
|
||||
// CHECK:STDOUT: !52 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.cb8adced19392b99:core.Destroy.Core", scope: null, file: !39, line: 6, type: !18, spFlags: DISPFlagDefinition, unit: !40, retainedNodes: !55)
|
||||
// CHECK:STDOUT: !53 = !DILocalVariable(arg: 1, scope: !52, type: !16)
|
||||
// CHECK:STDOUT: !54 = !DILocation(line: 6, column: 6, scope: !52)
|
||||
// CHECK:STDOUT: !55 = !{!53}
|
||||
// CHECK:STDOUT: !56 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core", scope: null, file: !39, line: 6, type: !18, spFlags: DISPFlagDefinition, unit: !40, retainedNodes: !59)
|
||||
// CHECK:STDOUT: !57 = !DILocalVariable(arg: 1, scope: !56, type: !16)
|
||||
// CHECK:STDOUT: !58 = !DILocation(line: 6, column: 6, scope: !56)
|
||||
// CHECK:STDOUT: !59 = !{!57}
|
||||
// CHECK:STDOUT: !60 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.08d9e38b928ba575:core.Destroy.Core", scope: null, file: !43, line: 6, type: !18, spFlags: DISPFlagDefinition, unit: !44, retainedNodes: !63)
|
||||
// CHECK:STDOUT: !61 = !DILocalVariable(arg: 1, scope: !60, type: !16)
|
||||
// CHECK:STDOUT: !62 = !DILocation(line: 6, column: 6, scope: !60)
|
||||
// CHECK:STDOUT: !63 = !{!61}
|
||||
// CHECK:STDOUT: !64 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core", scope: null, file: !43, line: 6, type: !18, spFlags: DISPFlagDefinition, unit: !44, retainedNodes: !67)
|
||||
// CHECK:STDOUT: !65 = !DILocalVariable(arg: 1, scope: !64, type: !16)
|
||||
// CHECK:STDOUT: !66 = !DILocation(line: 6, column: 6, scope: !64)
|
||||
// CHECK:STDOUT: !67 = !{!65}
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: ; ---
|
||||
// CHECK:STDOUT: ; ModuleID = 'return_slot.carbon'
|
||||
@@ -248,60 +226,53 @@ fn InitLet() {
|
||||
// CHECK:STDOUT: @C.val.loc7_12 = internal constant {} zeroinitializer
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: ; Function Attrs: nounwind
|
||||
// CHECK:STDOUT: define void @_CF.Main(ptr sret({}) %return) #0 !dbg !72 {
|
||||
// CHECK:STDOUT: define void @_CF.Main(ptr sret({}) %return) #0 !dbg !64 {
|
||||
// CHECK:STDOUT: entry:
|
||||
// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %return, ptr align 1 @C.val.loc7_12, i64 0, i1 false), !dbg !75
|
||||
// CHECK:STDOUT: ret void, !dbg !75
|
||||
// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %return, ptr align 1 @C.val.loc7_12, i64 0, i1 false), !dbg !67
|
||||
// CHECK:STDOUT: ret void, !dbg !67
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: declare void @_CG.Main()
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: ; Function Attrs: nounwind
|
||||
// CHECK:STDOUT: define void @_CForward.Main(ptr sret({}) %return) #0 !dbg !76 {
|
||||
// CHECK:STDOUT: define void @_CForward.Main(ptr sret({}) %return) #0 !dbg !68 {
|
||||
// CHECK:STDOUT: entry:
|
||||
// CHECK:STDOUT: call void @_CF.Main(ptr %return), !dbg !79
|
||||
// CHECK:STDOUT: ret void, !dbg !80
|
||||
// CHECK:STDOUT: call void @_CF.Main(ptr %return), !dbg !71
|
||||
// CHECK:STDOUT: ret void, !dbg !72
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: ; Function Attrs: nounwind
|
||||
// CHECK:STDOUT: define void @_CInitVar.Main() #0 !dbg !81 {
|
||||
// CHECK:STDOUT: define void @_CInitVar.Main() #0 !dbg !73 {
|
||||
// CHECK:STDOUT: entry:
|
||||
// CHECK:STDOUT: %_.var = alloca {}, align 1, !dbg !82
|
||||
// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !82
|
||||
// CHECK:STDOUT: call void @_CF.Main(ptr %_.var), !dbg !83
|
||||
// CHECK:STDOUT: call void @_CG.Main(), !dbg !85
|
||||
// CHECK:STDOUT: call void @"_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core"(ptr %_.var), !dbg !82
|
||||
// CHECK:STDOUT: ret void, !dbg !86
|
||||
// CHECK:STDOUT: %_.var = alloca {}, align 1, !dbg !74
|
||||
// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !74
|
||||
// CHECK:STDOUT: call void @_CF.Main(ptr %_.var), !dbg !75
|
||||
// CHECK:STDOUT: call void @_CG.Main(), !dbg !77
|
||||
// CHECK:STDOUT: call void @"_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core"(ptr %_.var), !dbg !74
|
||||
// CHECK:STDOUT: ret void, !dbg !78
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: ; Function Attrs: nounwind
|
||||
// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.cb8adced19392b99:core.Destroy.Core"(ptr %self) #0 !dbg !87 {
|
||||
// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.cb8adced19392b99:core.Destroy.Core"(ptr %self) #0 !dbg !79 {
|
||||
// CHECK:STDOUT: entry:
|
||||
// CHECK:STDOUT: ret void, !dbg !89
|
||||
// CHECK:STDOUT: ret void, !dbg !81
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: ; Function Attrs: nounwind
|
||||
// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.08d9e38b928ba575:core.Destroy.Core"(ptr %self) #0 !dbg !91 {
|
||||
// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core"(ptr %self) #0 !dbg !83 {
|
||||
// CHECK:STDOUT: entry:
|
||||
// CHECK:STDOUT: ret void, !dbg !93
|
||||
// CHECK:STDOUT: ret void, !dbg !85
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: ; Function Attrs: nounwind
|
||||
// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core"(ptr %self) #0 !dbg !95 {
|
||||
// CHECK:STDOUT: define void @_CInitLet.Main() #0 !dbg !87 {
|
||||
// CHECK:STDOUT: entry:
|
||||
// CHECK:STDOUT: call void @"_CSubobjectDestroy.08d9e38b928ba575:core.Destroy.Core"(ptr %self), !dbg !97
|
||||
// CHECK:STDOUT: ret void, !dbg !97
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: ; Function Attrs: nounwind
|
||||
// CHECK:STDOUT: define void @_CInitLet.Main() #0 !dbg !99 {
|
||||
// CHECK:STDOUT: entry:
|
||||
// CHECK:STDOUT: %.loc22_16.1.temp = alloca {}, align 1, !dbg !100
|
||||
// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc22_16.1.temp), !dbg !100
|
||||
// CHECK:STDOUT: call void @_CF.Main(ptr %.loc22_16.1.temp), !dbg !100
|
||||
// CHECK:STDOUT: call void @_CG.Main(), !dbg !103
|
||||
// CHECK:STDOUT: call void @"_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core"(ptr %.loc22_16.1.temp), !dbg !100
|
||||
// CHECK:STDOUT: ret void, !dbg !104
|
||||
// CHECK:STDOUT: %.loc22_16.1.temp = alloca {}, align 1, !dbg !88
|
||||
// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc22_16.1.temp), !dbg !88
|
||||
// CHECK:STDOUT: call void @_CF.Main(ptr %.loc22_16.1.temp), !dbg !88
|
||||
// CHECK:STDOUT: call void @_CG.Main(), !dbg !91
|
||||
// CHECK:STDOUT: call void @"_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core"(ptr %.loc22_16.1.temp), !dbg !88
|
||||
// CHECK:STDOUT: ret void, !dbg !92
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
|
||||
@@ -316,7 +287,7 @@ fn InitLet() {
|
||||
// CHECK:STDOUT: attributes #0 = { nounwind }
|
||||
// CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !llvm.dbg.cu = !{!69}
|
||||
// CHECK:STDOUT: !llvm.dbg.cu = !{!61}
|
||||
// CHECK:STDOUT: !llvm.module.flags = !{!2, !3}
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5}
|
||||
@@ -326,34 +297,30 @@ fn InitLet() {
|
||||
// CHECK:STDOUT: !18 = !DISubroutineType(types: !17)
|
||||
// CHECK:STDOUT: !19 = !{null}
|
||||
// CHECK:STDOUT: !20 = !DISubroutineType(types: !19)
|
||||
// CHECK:STDOUT: !68 = !DIFile(filename: "return_slot.carbon", directory: "")
|
||||
// CHECK:STDOUT: !69 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !68, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug)
|
||||
// CHECK:STDOUT: !70 = !{!16}
|
||||
// CHECK:STDOUT: !71 = !DISubroutineType(types: !70)
|
||||
// CHECK:STDOUT: !72 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !68, line: 6, type: !71, spFlags: DISPFlagDefinition, unit: !69)
|
||||
// CHECK:STDOUT: !75 = !DILocation(line: 7, column: 3, scope: !72)
|
||||
// CHECK:STDOUT: !76 = distinct !DISubprogram(name: "Forward", linkageName: "_CForward.Main", scope: null, file: !68, line: 12, type: !71, spFlags: DISPFlagDefinition, unit: !69)
|
||||
// CHECK:STDOUT: !79 = !DILocation(line: 13, column: 10, scope: !76)
|
||||
// CHECK:STDOUT: !80 = !DILocation(line: 13, column: 3, scope: !76)
|
||||
// CHECK:STDOUT: !81 = distinct !DISubprogram(name: "InitVar", linkageName: "_CInitVar.Main", scope: null, file: !68, line: 16, type: !20, spFlags: DISPFlagDefinition, unit: !69)
|
||||
// CHECK:STDOUT: !82 = !DILocation(line: 17, column: 3, scope: !81)
|
||||
// CHECK:STDOUT: !83 = !DILocation(line: 17, column: 14, scope: !81)
|
||||
// CHECK:STDOUT: !85 = !DILocation(line: 18, column: 3, scope: !81)
|
||||
// CHECK:STDOUT: !86 = !DILocation(line: 16, column: 1, scope: !81)
|
||||
// CHECK:STDOUT: !87 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.cb8adced19392b99:core.Destroy.Core", scope: null, file: !68, line: 17, type: !18, spFlags: DISPFlagDefinition, unit: !69, retainedNodes: !90)
|
||||
// CHECK:STDOUT: !88 = !DILocalVariable(arg: 1, scope: !87, type: !16)
|
||||
// CHECK:STDOUT: !89 = !DILocation(line: 17, column: 3, scope: !87)
|
||||
// CHECK:STDOUT: !90 = !{!88}
|
||||
// CHECK:STDOUT: !91 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.08d9e38b928ba575:core.Destroy.Core", scope: null, file: !68, line: 17, type: !18, spFlags: DISPFlagDefinition, unit: !69, retainedNodes: !94)
|
||||
// CHECK:STDOUT: !92 = !DILocalVariable(arg: 1, scope: !91, type: !16)
|
||||
// CHECK:STDOUT: !93 = !DILocation(line: 17, column: 3, scope: !91)
|
||||
// CHECK:STDOUT: !94 = !{!92}
|
||||
// CHECK:STDOUT: !95 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core", scope: null, file: !68, line: 17, type: !18, spFlags: DISPFlagDefinition, unit: !69, retainedNodes: !98)
|
||||
// CHECK:STDOUT: !96 = !DILocalVariable(arg: 1, scope: !95, type: !16)
|
||||
// CHECK:STDOUT: !97 = !DILocation(line: 17, column: 3, scope: !95)
|
||||
// CHECK:STDOUT: !98 = !{!96}
|
||||
// CHECK:STDOUT: !99 = distinct !DISubprogram(name: "InitLet", linkageName: "_CInitLet.Main", scope: null, file: !68, line: 21, type: !20, spFlags: DISPFlagDefinition, unit: !69)
|
||||
// CHECK:STDOUT: !100 = !DILocation(line: 22, column: 14, scope: !99)
|
||||
// CHECK:STDOUT: !103 = !DILocation(line: 23, column: 3, scope: !99)
|
||||
// CHECK:STDOUT: !104 = !DILocation(line: 21, column: 1, scope: !99)
|
||||
// CHECK:STDOUT: !60 = !DIFile(filename: "return_slot.carbon", directory: "")
|
||||
// CHECK:STDOUT: !61 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !60, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug)
|
||||
// CHECK:STDOUT: !62 = !{!16}
|
||||
// CHECK:STDOUT: !63 = !DISubroutineType(types: !62)
|
||||
// CHECK:STDOUT: !64 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !60, line: 6, type: !63, spFlags: DISPFlagDefinition, unit: !61)
|
||||
// CHECK:STDOUT: !67 = !DILocation(line: 7, column: 3, scope: !64)
|
||||
// CHECK:STDOUT: !68 = distinct !DISubprogram(name: "Forward", linkageName: "_CForward.Main", scope: null, file: !60, line: 12, type: !63, spFlags: DISPFlagDefinition, unit: !61)
|
||||
// CHECK:STDOUT: !71 = !DILocation(line: 13, column: 10, scope: !68)
|
||||
// CHECK:STDOUT: !72 = !DILocation(line: 13, column: 3, scope: !68)
|
||||
// CHECK:STDOUT: !73 = distinct !DISubprogram(name: "InitVar", linkageName: "_CInitVar.Main", scope: null, file: !60, line: 16, type: !20, spFlags: DISPFlagDefinition, unit: !61)
|
||||
// CHECK:STDOUT: !74 = !DILocation(line: 17, column: 3, scope: !73)
|
||||
// CHECK:STDOUT: !75 = !DILocation(line: 17, column: 14, scope: !73)
|
||||
// CHECK:STDOUT: !77 = !DILocation(line: 18, column: 3, scope: !73)
|
||||
// CHECK:STDOUT: !78 = !DILocation(line: 16, column: 1, scope: !73)
|
||||
// CHECK:STDOUT: !79 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.cb8adced19392b99:core.Destroy.Core", scope: null, file: !60, line: 17, type: !18, spFlags: DISPFlagDefinition, unit: !61, retainedNodes: !82)
|
||||
// CHECK:STDOUT: !80 = !DILocalVariable(arg: 1, scope: !79, type: !16)
|
||||
// CHECK:STDOUT: !81 = !DILocation(line: 17, column: 3, scope: !79)
|
||||
// CHECK:STDOUT: !82 = !{!80}
|
||||
// CHECK:STDOUT: !83 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core", scope: null, file: !60, line: 17, type: !18, spFlags: DISPFlagDefinition, unit: !61, retainedNodes: !86)
|
||||
// CHECK:STDOUT: !84 = !DILocalVariable(arg: 1, scope: !83, type: !16)
|
||||
// CHECK:STDOUT: !85 = !DILocation(line: 17, column: 3, scope: !83)
|
||||
// CHECK:STDOUT: !86 = !{!84}
|
||||
// CHECK:STDOUT: !87 = distinct !DISubprogram(name: "InitLet", linkageName: "_CInitLet.Main", scope: null, file: !60, line: 21, type: !20, spFlags: DISPFlagDefinition, unit: !61)
|
||||
// CHECK:STDOUT: !88 = !DILocation(line: 22, column: 14, scope: !87)
|
||||
// CHECK:STDOUT: !91 = !DILocation(line: 23, column: 3, scope: !87)
|
||||
// CHECK:STDOUT: !92 = !DILocation(line: 21, column: 1, scope: !87)
|
||||
// CHECK:STDOUT:
|
||||
|
||||
@@ -112,37 +112,23 @@ fn Call() {
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: ; Function Attrs: nounwind
|
||||
// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !85 {
|
||||
// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !85 {
|
||||
// CHECK:STDOUT: entry:
|
||||
// CHECK:STDOUT: ret void, !dbg !87
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: ; Function Attrs: nounwind
|
||||
// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !89 {
|
||||
// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.cb8adced19392b99:core.Destroy.Core"(ptr %self) #0 !dbg !89 {
|
||||
// CHECK:STDOUT: entry:
|
||||
// CHECK:STDOUT: call void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self), !dbg !91
|
||||
// CHECK:STDOUT: ret void, !dbg !91
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: ; Function Attrs: nounwind
|
||||
// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.cb8adced19392b99:core.Destroy.Core"(ptr %self) #0 !dbg !93 {
|
||||
// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.8b0bf151036f045a:core.Destroy.Core"(ptr %self) #0 !dbg !93 {
|
||||
// CHECK:STDOUT: entry:
|
||||
// CHECK:STDOUT: ret void, !dbg !95
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: ; Function Attrs: nounwind
|
||||
// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.8b0bf151036f045a:core.Destroy.Core"(ptr %self) #0 !dbg !97 {
|
||||
// CHECK:STDOUT: entry:
|
||||
// CHECK:STDOUT: ret void, !dbg !99
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: ; Function Attrs: nounwind
|
||||
// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.8b0bf151036f045a:core.Destroy.Core"(ptr %self) #0 !dbg !101 {
|
||||
// CHECK:STDOUT: entry:
|
||||
// CHECK:STDOUT: call void @"_CSubobjectDestroy.8b0bf151036f045a:core.Destroy.Core"(ptr %self), !dbg !103
|
||||
// CHECK:STDOUT: ret void, !dbg !103
|
||||
// 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)) #1
|
||||
// CHECK:STDOUT:
|
||||
@@ -216,24 +202,16 @@ fn Call() {
|
||||
// CHECK:STDOUT: !82 = !DILocalVariable(arg: 1, scope: !81, type: !20)
|
||||
// CHECK:STDOUT: !83 = !DILocation(line: 15, column: 15, scope: !81)
|
||||
// CHECK:STDOUT: !84 = !{!82}
|
||||
// CHECK:STDOUT: !85 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core", scope: null, file: !18, line: 15, type: !22, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !88)
|
||||
// CHECK:STDOUT: !85 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !18, line: 15, type: !22, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !88)
|
||||
// CHECK:STDOUT: !86 = !DILocalVariable(arg: 1, scope: !85, type: !20)
|
||||
// CHECK:STDOUT: !87 = !DILocation(line: 15, column: 15, scope: !85)
|
||||
// CHECK:STDOUT: !88 = !{!86}
|
||||
// CHECK:STDOUT: !89 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !18, line: 15, type: !22, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !92)
|
||||
// CHECK:STDOUT: !90 = !DILocalVariable(arg: 1, scope: !89, type: !20)
|
||||
// CHECK:STDOUT: !91 = !DILocation(line: 15, column: 15, scope: !89)
|
||||
// CHECK:STDOUT: !89 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.cb8adced19392b99:core.Destroy.Core", scope: null, file: !18, line: 16, type: !25, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !92)
|
||||
// CHECK:STDOUT: !90 = !DILocalVariable(arg: 1, scope: !89, type: !23)
|
||||
// CHECK:STDOUT: !91 = !DILocation(line: 16, column: 13, scope: !89)
|
||||
// CHECK:STDOUT: !92 = !{!90}
|
||||
// CHECK:STDOUT: !93 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.cb8adced19392b99:core.Destroy.Core", scope: null, file: !18, line: 16, type: !25, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !96)
|
||||
// CHECK:STDOUT: !93 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.8b0bf151036f045a:core.Destroy.Core", scope: null, file: !18, line: 16, type: !25, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !96)
|
||||
// CHECK:STDOUT: !94 = !DILocalVariable(arg: 1, scope: !93, type: !23)
|
||||
// CHECK:STDOUT: !95 = !DILocation(line: 16, column: 13, scope: !93)
|
||||
// CHECK:STDOUT: !96 = !{!94}
|
||||
// CHECK:STDOUT: !97 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.8b0bf151036f045a:core.Destroy.Core", scope: null, file: !18, line: 16, type: !25, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !100)
|
||||
// CHECK:STDOUT: !98 = !DILocalVariable(arg: 1, scope: !97, type: !23)
|
||||
// CHECK:STDOUT: !99 = !DILocation(line: 16, column: 13, scope: !97)
|
||||
// CHECK:STDOUT: !100 = !{!98}
|
||||
// CHECK:STDOUT: !101 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.8b0bf151036f045a:core.Destroy.Core", scope: null, file: !18, line: 16, type: !25, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !104)
|
||||
// CHECK:STDOUT: !102 = !DILocalVariable(arg: 1, scope: !101, type: !23)
|
||||
// CHECK:STDOUT: !103 = !DILocation(line: 16, column: 13, scope: !101)
|
||||
// CHECK:STDOUT: !104 = !{!102}
|
||||
// CHECK:STDOUT:
|
||||
|
||||
Reference in New Issue
Block a user