1 | // RUN: %clang -flimit-debug-info -emit-llvm -g -S %s -o - | FileCheck %s |
2 | // RUN: %clang -flimit-debug-info -emit-llvm -g -S %s -o - | FileCheck --check-prefix=CHECK-C %s |
3 | |
4 | // CHECK: !DICompositeType(tag: DW_TAG_class_type, name: "A" |
5 | // CHECK-NOT: DIFlagFwdDecl |
6 | // CHECK-SAME: ){{$}} |
7 | class A { |
8 | public: |
9 | int z; |
10 | }; |
11 | |
12 | A *foo (A* x) { |
13 | A *a = new A(*x); |
14 | return a; |
15 | } |
16 | |
17 | // CHECK: !DICompositeType(tag: DW_TAG_class_type, name: "B" |
18 | // CHECK-SAME: flags: DIFlagFwdDecl |
19 | |
20 | class B { |
21 | public: |
22 | int y; |
23 | }; |
24 | |
25 | extern int bar(B *b); |
26 | int baz(B *b) { |
27 | return bar(b); |
28 | } |
29 | |
30 | |
31 | // CHECK-C: !DICompositeType(tag: DW_TAG_structure_type, name: "C" |
32 | // CHECK-C-SAME: flags: DIFlagFwdDecl |
33 | |
34 | struct C { |
35 | }; |
36 | |
37 | C (*x)(C); |
38 | |