blob: 351dc0524e9b86d3861c4b2bb13b6472844065e0 [file] [log] [blame]
Eric Christopher85b9e8c2011-12-17 00:35:01 +00001// RUN: %clang_cc1 -emit-llvm -g -triple x86_64-apple-darwin %s -o - | FileCheck %s
Eric Christopher435e1062011-12-16 23:40:14 +00002
3struct baz {
4 int h;
5 baz(int a) : h(a) {}
6};
7
8struct bar {
9 baz b;
10 baz& b_ref;
11 bar(int x) : b(x), b_ref(b) {}
12};
13
14int main(int argc, char** argv) {
15 bar myBar(1);
16 return 0;
17}
18
David Blaikie70ae1222012-11-02 23:40:00 +000019// Make sure we have two DW_TAG_structure_types for baz and bar and no forward
Eric Christopher435e1062011-12-16 23:40:14 +000020// references.
Pirama Arumuga Nainar3ea9e332015-04-08 08:57:32 -070021// CHECK-NOT: DIFlagFwdDecl
22// CHECK: !MDCompositeType(tag: DW_TAG_structure_type, name: "bar"
23// CHECK-NOT: DIFlagFwdDecl
24// CHECK: !MDCompositeType(tag: DW_TAG_structure_type, name: "baz"
25// CHECK-NOT: DIFlagFwdDecl