Eric Christopher | 85b9e8c | 2011-12-17 00:35:01 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -emit-llvm -g -triple x86_64-apple-darwin %s -o - | FileCheck %s |
Eric Christopher | 435e106 | 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 | 70ae122 | 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 | 435e106 | 2011-12-16 23:40:14 +0000 | [diff] [blame] | 20 | // references. |
David Blaikie | 8a40cc6 | 2013-03-19 23:10:14 +0000 | [diff] [blame] | 21 | // CHECK-NOT: [fwd] |
| 22 | // CHECK: [ DW_TAG_structure_type ] [bar] |
| 23 | // CHECK: [ DW_TAG_structure_type ] [baz] |
| 24 | // CHECK-NOT: [fwd] |