1 ; RUN: llc < %s -filetype=obj -o %t
2 ; RUN: llvm-dwarfdump -v %t | FileCheck %s
4 ; C++ source to regenerate:
7 ; // Defaulted on purpose, so as to facilitate object creation
10 ; deleted(const deleted &) = delete;
11 ; deleted &operator=(const deleted &) = delete;
13 ; deleted(deleted &&) = delete;
14 ; deleted &operator=(deleted &&) = delete;
16 ; ~deleted() = default;
22 ; $ clang++ -O0 -g -gdwarf-5 debug-info-deleted.cpp -c
25 ; CHECK: .debug_abbrev contents:
27 ; CHECK: [7] DW_TAG_subprogram DW_CHILDREN_yes
28 ; CHECK: DW_AT_deleted DW_FORM_flag_present
29 ; CHECK: [9] DW_TAG_subprogram DW_CHILDREN_yes
30 ; CHECK: DW_AT_deleted DW_FORM_flag_present
32 ; CHECK: .debug_info contents:
34 ; CHECK: DW_TAG_subprogram [7]
35 ; CHECK-NEXT: DW_AT_name [DW_FORM_strx1] (indexed (00000006) string = "deleted")
36 ; CHECK: DW_AT_deleted [DW_FORM_flag_present] (true)
38 ; CHECK: DW_TAG_subprogram [9]
39 ; CHECK-NEXT: DW_AT_linkage_name [DW_FORM_strx1] (indexed (00000007) string = "_ZN7deletedaSERKS_")
40 ; CHECK: DW_AT_deleted [DW_FORM_flag_present] (true)
42 ; CHECK: DW_TAG_subprogram [7]
43 ; CHECK-NEXT: DW_AT_name [DW_FORM_strx1] (indexed (00000006) string = "deleted")
44 ; CHECK: DW_AT_deleted [DW_FORM_flag_present] (true)
46 ; CHECK: DW_TAG_subprogram [9]
47 ; CHECK-NEXT: DW_AT_linkage_name [DW_FORM_strx1] (indexed (00000009) string = "_ZN7deletedaSEOS_")
48 ; CHECK-NEXT: DW_AT_name [DW_FORM_strx1] (indexed (00000008) string = "operator=")
49 ; CHECK: DW_AT_deleted [DW_FORM_flag_present] (true)
51 ; ModuleID = 'debug-info-deleted.cpp'
52 source_filename = "debug-info-deleted.cpp"
53 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
54 target triple = "x86_64-unknown-linux-gnu"
56 %class.deleted = type { i8 }
58 ; Function Attrs: noinline nounwind optnone uwtable
59 define dso_local void @_Z3foov() #0 !dbg !7 {
60 %1 = alloca %class.deleted, align 1
61 call void @llvm.dbg.declare(metadata %class.deleted* %1, metadata !10, metadata !DIExpression()), !dbg !34
65 ; Function Attrs: nounwind readnone speculatable willreturn
66 declare void @llvm.dbg.declare(metadata, metadata, metadata) #1
68 attributes #0 = { noinline nounwind optnone uwtable }
69 attributes #1 = { nounwind readnone speculatable willreturn }
72 !llvm.module.flags = !{!3, !4, !5}
75 !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus_14, file: !1, producer: "clang version 10.0.0 (https://github.com/llvm/llvm-project.git 715c47d5de9aa8860050992a7aaf27dca53f7f4a)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, nameTableKind: None)
76 !1 = !DIFile(filename: "debug-info-deleted.cpp", directory: "/home/sourabh/work/dwarf/c_c++/c++11", checksumkind: CSK_MD5, checksum: "49dc56907586479c64634558b060292d")
78 !3 = !{i32 2, !"Dwarf Version", i32 5}
79 !4 = !{i32 2, !"Debug Info Version", i32 3}
80 !5 = !{i32 1, !"wchar_size", i32 4}
81 !6 = !{!"clang version 10.0.0 (https://github.com/llvm/llvm-project.git 715c47d5de9aa8860050992a7aaf27dca53f7f4a)"}
82 !7 = distinct !DISubprogram(name: "foo", linkageName: "_Z3foov", scope: !1, file: !1, line: 14, type: !8, scopeLine: 14, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !2)
83 !8 = !DISubroutineType(types: !9)
85 !10 = !DILocalVariable(name: "obj1", scope: !7, file: !1, line: 15, type: !11)
86 !11 = distinct !DICompositeType(tag: DW_TAG_class_type, name: "deleted", file: !1, line: 1, size: 8, flags: DIFlagTypePassByReference, elements: !12, identifier: "_ZTS7deleted")
87 !12 = !{!13, !17, !22, !26, !30, !33}
88 !13 = !DISubprogram(name: "deleted", scope: !11, file: !1, line: 3, type: !14, scopeLine: 3, flags: DIFlagPublic | DIFlagPrototyped, spFlags: 0)
89 !14 = !DISubroutineType(types: !15)
91 !16 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !11, size: 64, flags: DIFlagArtificial | DIFlagObjectPointer)
92 !17 = !DISubprogram(name: "deleted", scope: !11, file: !1, line: 5, type: !18, scopeLine: 5, flags: DIFlagPublic | DIFlagPrototyped, spFlags: DISPFlagDeleted)
93 !18 = !DISubroutineType(types: !19)
94 !19 = !{null, !16, !20}
95 !20 = !DIDerivedType(tag: DW_TAG_reference_type, baseType: !21, size: 64)
96 !21 = !DIDerivedType(tag: DW_TAG_const_type, baseType: !11)
97 !22 = !DISubprogram(name: "operator=", linkageName: "_ZN7deletedaSERKS_", scope: !11, file: !1, line: 6, type: !23, scopeLine: 6, flags: DIFlagPublic | DIFlagPrototyped, spFlags: DISPFlagDeleted)
98 !23 = !DISubroutineType(types: !24)
99 !24 = !{!25, !16, !20}
100 !25 = !DIDerivedType(tag: DW_TAG_reference_type, baseType: !11, size: 64)
101 !26 = !DISubprogram(name: "deleted", scope: !11, file: !1, line: 8, type: !27, scopeLine: 8, flags: DIFlagPublic | DIFlagPrototyped, spFlags: DISPFlagDeleted)
102 !27 = !DISubroutineType(types: !28)
103 !28 = !{null, !16, !29}
104 !29 = !DIDerivedType(tag: DW_TAG_rvalue_reference_type, baseType: !11, size: 64)
105 !30 = !DISubprogram(name: "operator=", linkageName: "_ZN7deletedaSEOS_", scope: !11, file: !1, line: 9, type: !31, scopeLine: 9, flags: DIFlagPublic | DIFlagPrototyped, spFlags: DISPFlagDeleted)
106 !31 = !DISubroutineType(types: !32)
107 !32 = !{!25, !16, !29}
108 !33 = !DISubprogram(name: "~deleted", scope: !11, file: !1, line: 11, type: !14, scopeLine: 11, flags: DIFlagPublic | DIFlagPrototyped, spFlags: 0)
109 !34 = !DILocation(line: 15, column: 13, scope: !7)
110 !35 = !DILocation(line: 16, column: 3, scope: !7)