blob: e01733c77777eb6f0f0836853b460b96e95668b9 [file] [log] [blame]
Eric Christopher435e1062011-12-16 23:40:14 +00001// RUN: %clang_cc1 -emit-llvm -g %s -o - | FileCheck %s
2
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
19// Make sure we have two DW_TAG_class_types for baz and bar for their forward
20// references.
21// FIXME: These should be struct types to match the declaration.
22// CHECK: !17 = metadata !{i32 720898, null, metadata !"baz", metadata !6, i32 3, i64 0, i64 0, i32 0, i32 4, null, null, i32 0, null, null} ; [ DW_TAG_class_type ]
23// CHECK: !26 = metadata !{i32 720898, null, metadata !"bar", metadata !6, i32 8, i64 0, i64 0, i32 0, i32 4, null, null, i32 0, null, null} ; [ DW_TAG_class_type ]