Douglas Katzman | 3459ce2 | 2015-10-08 04:24:12 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -emit-llvm -debug-info-kind=limited -triple x86_64-apple-darwin %s -o - | FileCheck %s |
Eric Christopher | ea225fb | 2011-12-16 23:40:14 +0000 | [diff] [blame] | 2 | |
| 3 | struct baz { |
| 4 | int h; |
| 5 | baz(int a) : h(a) {} |
| 6 | }; |
| 7 | |
| 8 | struct bar { |
| 9 | baz b; |
| 10 | baz& b_ref; |
| 11 | bar(int x) : b(x), b_ref(b) {} |
| 12 | }; |
| 13 | |
| 14 | int main(int argc, char** argv) { |
| 15 | bar myBar(1); |
| 16 | return 0; |
| 17 | } |
| 18 | |
David Blaikie | 8ed46b9 | 2012-11-02 23:40:00 +0000 | [diff] [blame] | 19 | // Make sure we have two DW_TAG_structure_types for baz and bar and no forward |
Eric Christopher | ea225fb | 2011-12-16 23:40:14 +0000 | [diff] [blame] | 20 | // references. |
Duncan P. N. Exon Smith | f04be1f | 2015-03-03 17:25:55 +0000 | [diff] [blame] | 21 | // CHECK-NOT: DIFlagFwdDecl |
Duncan P. N. Exon Smith | 9dd4e4e | 2015-04-29 16:40:08 +0000 | [diff] [blame] | 22 | // CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "bar" |
Duncan P. N. Exon Smith | f04be1f | 2015-03-03 17:25:55 +0000 | [diff] [blame] | 23 | // CHECK-NOT: DIFlagFwdDecl |
Duncan P. N. Exon Smith | 9dd4e4e | 2015-04-29 16:40:08 +0000 | [diff] [blame] | 24 | // CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "baz" |
Duncan P. N. Exon Smith | f04be1f | 2015-03-03 17:25:55 +0000 | [diff] [blame] | 25 | // CHECK-NOT: DIFlagFwdDecl |