16 B::~B() { extern void mayThrow(); mayThrow();
44 static const int i
= 2;
56 struct I
: virtual H
{};
67 static const int HdrSize
= 52;
93 int main(int argc
, char **argv
) {
102 // RUN: %clang_cc1 -triple x86_64-unknown_unknown -emit-llvm -debug-info-kind=limited -fexceptions -std=c++98 %s -o - | FileCheck -check-prefix=CHECK98 -check-prefix=CHECK %s
103 // RUN: %clang_cc1 -triple i686-cygwin -emit-llvm -debug-info-kind=limited -fexceptions -std=c++98 %s -o - | FileCheck -check-prefix=CHECK98 -check-prefix=CHECK %s
104 // RUN: %clang_cc1 -triple armv7l-unknown-linux-gnueabihf -emit-llvm -debug-info-kind=limited -fexceptions -std=c++98 %s -o - | FileCheck -check-prefix=CHECK98 -check-prefix=CHECK %s
105 // RUN: %clang_cc1 -triple x86_64-unknown_unknown -emit-llvm -debug-info-kind=limited -fexceptions -std=c++11 %s -o - | FileCheck -check-prefix=CHECK11 -check-prefix=CHECK %s
106 // RUN: %clang_cc1 -triple i686-cygwin -emit-llvm -debug-info-kind=limited -fexceptions -std=c++11 %s -o - | FileCheck -check-prefix=CHECK11 -check-prefix=CHECK %s
107 // RUN: %clang_cc1 -triple armv7l-unknown-linux-gnueabihf -emit-llvm -debug-info-kind=limited -fexceptions -std=c++11 %s -o - | FileCheck -check-prefix=CHECK11 -check-prefix=CHECK %s
109 // CHECK98: invoke {{.+}} @_ZN1BD1Ev(ptr {{[^,]*}} %b)
110 // CHECK98-NEXT: unwind label %{{.+}}, !dbg ![[EXCEPTLOC:.*]]
111 // CHECK11: call {{.+}} @_ZN1BD1Ev(ptr {{[^,]*}} %b){{.*}}, !dbg ![[EXCEPTLOC:.*]]
113 // CHECK: store i32 0, ptr %{{.+}}, !dbg ![[RETLOC:.*]]
115 // CHECK: [[F:![0-9]*]] = !DICompositeType(tag: DW_TAG_structure_type, name: "F"
116 // CHECK-SAME: DIFlagFwdDecl
117 // CHECK-NOT: identifier:
118 // CHECK-SAME: ){{$}}
119 // CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "I"
120 // CHECK-NOT: DIFlagFwdDecl
121 // CHECK-SAME: ){{$}}
123 // CHECK: ![[INT:[0-9]+]] = !DIBasicType(name: "int"
124 // CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "foo"
125 // CHECK: !DICompositeType(tag: DW_TAG_class_type, name: "bar"
126 // CHECK: !DICompositeType(tag: DW_TAG_union_type, name: "baz"
127 // CHECK: !DICompositeType(tag: DW_TAG_class_type, name: "B"
128 // CHECK-NOT: DIFlagFwdDecl
129 // CHECK-SAME: ){{$}}
130 // CHECK: !DIDerivedType(tag: DW_TAG_member, name: "_vptr$B",
131 // CHECK-SAME: DIFlagArtificial
133 // CHECK: [[C:![0-9]*]] = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "C",
134 // CHECK-NOT: DIFlagFwdDecl
135 // CHECK-SAME: elements: [[C_MEM:![0-9]*]]
136 // CHECK-SAME: vtableHolder: [[C]]
137 // CHECK-NOT: identifier:
138 // CHECK-SAME: ){{$}}
139 // CHECK: [[C_MEM]] = !{[[C_VPTR:![0-9]*]], [[C_S:![0-9]*]], [[C_DTOR:![0-9]*]]}
140 // CHECK: [[C_VPTR]] = !DIDerivedType(tag: DW_TAG_member, name: "_vptr$C"
141 // CHECK-SAME: DIFlagArtificial
142 // CHECK: [[C_S]] = !DIDerivedType(tag: DW_TAG_member, name: "s"
143 // CHECK-SAME: baseType: ![[INT]]
144 // CHECK-SAME: DIFlagStaticMember
145 // CHECK: [[C_DTOR]] = !DISubprogram(name: "~C"
147 // CHECK: [[D:![0-9]+]] = !DICompositeType(tag: DW_TAG_structure_type, name: "D"
149 // CHECK-SAME: DIFlagFwdDecl
150 // CHECK-NOT: identifier:
151 // CHECK-SAME: ){{$}}
153 // CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "E"
154 // CHECK-SAME: DIFlagFwdDecl
155 // CHECK-NOT: identifier:
156 // CHECK-SAME: ){{$}}
158 // CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "K"
159 // CHECK-SAME: identifier: "_ZTS1K"
160 // CHECK-SAME: ){{$}}
162 // CHECK: [[L:![0-9]+]] = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "L"
163 // CHECK-SAME: ){{$}}
164 // CHECK: [[L_FUNC_DECL:![0-9]*]] = !DISubprogram(name: "func",{{.*}} scope: [[L]]
165 // CHECK-SAME: DISPFlagLocalToUnit
167 // CHECK: !DISubprogram(name: "func",{{.*}} scope: [[D]]
168 // CHECK-SAME: DISPFlagDefinition
169 // CHECK-SAME: declaration: [[D_FUNC_DECL:![0-9]*]]
170 // CHECK: [[D_FUNC_DECL]] = !DISubprogram(name: "func",{{.*}} scope: [[D]]
172 // CHECK: !DISubprogram(name: "func",{{.*}} scope: [[L]]
173 // CHECK-SAME: DISPFlagLocalToUnit | DISPFlagDefinition
174 // CHECK-SAME: declaration: [[L_FUNC_DECL]]
176 // CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "inner",{{.*}} line: 50
177 // CHECK-NOT: DIFlagFwdDecl
178 // CHECK-SAME: elements: [[G_INNER_MEM:![0-9]*]]
179 // CHECK-SAME: identifier: "_ZTSN1G5innerE"
181 // CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "G"
182 // CHECK-SAME: DIFlagFwdDecl
183 // CHECK-NOT: identifier:
184 // CHECK-SAME: ){{$}}
185 // CHECK: [[G_INNER_MEM]] = !{[[G_INNER_I:![0-9]*]]}
186 // CHECK: [[G_INNER_I]] = !DIDerivedType(tag: DW_TAG_member, name: "j"
187 // CHECK-SAME: baseType: ![[INT]]
189 // CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "A"
190 // CHECK: !DIDerivedType(tag: DW_TAG_member, name: "HdrSize"
192 // CHECK: ![[EXCEPTLOC]] = !DILocation(line: 100,
193 // CHECK: ![[RETLOC]] = !DILocation(line: 99,