mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-06 08:54:47 +01:00
Classify classes with no struct fields as trivially destructible (#7846)
This commit is contained in:
+2
-13
@@ -46,18 +46,11 @@ fn Main() {
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: ; Function Attrs: nounwind
|
||||
// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !40 {
|
||||
// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !40 {
|
||||
// CHECK:STDOUT: entry:
|
||||
// CHECK:STDOUT: ret void, !dbg !42
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: ; Function Attrs: nounwind
|
||||
// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !44 {
|
||||
// CHECK:STDOUT: entry:
|
||||
// CHECK:STDOUT: call void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self), !dbg !46
|
||||
// CHECK:STDOUT: ret void, !dbg !46
|
||||
// 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:
|
||||
@@ -89,12 +82,8 @@ fn Main() {
|
||||
// CHECK:STDOUT: !37 = !DILocalVariable(arg: 1, scope: !36, type: !20)
|
||||
// CHECK:STDOUT: !38 = !DILocation(line: 16, column: 3, scope: !36)
|
||||
// CHECK:STDOUT: !39 = !{!37}
|
||||
// CHECK:STDOUT: !40 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core", scope: null, file: !18, line: 16, type: !22, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !43)
|
||||
// CHECK:STDOUT: !40 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !18, line: 16, type: !22, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !43)
|
||||
// CHECK:STDOUT: !41 = !DILocalVariable(arg: 1, scope: !40, type: !20)
|
||||
// CHECK:STDOUT: !42 = !DILocation(line: 16, column: 3, scope: !40)
|
||||
// CHECK:STDOUT: !43 = !{!41}
|
||||
// CHECK:STDOUT: !44 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !18, line: 16, type: !22, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !47)
|
||||
// CHECK:STDOUT: !45 = !DILocalVariable(arg: 1, scope: !44, type: !20)
|
||||
// CHECK:STDOUT: !46 = !DILocation(line: 16, column: 3, scope: !44)
|
||||
// CHECK:STDOUT: !47 = !{!45}
|
||||
// CHECK:STDOUT:
|
||||
|
||||
Reference in New Issue
Block a user