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