]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - test/CodeGenCXX/debug-info-limited.cpp
Vendor import of clang release_34 branch r197841 (effectively, 3.4 RC3):
[FreeBSD/FreeBSD.git] / test / CodeGenCXX / debug-info-limited.cpp
1 // RUN: %clang -flimit-debug-info -emit-llvm -g -S %s -o - | FileCheck %s
2
3 // CHECK: ; [ DW_TAG_class_type ] [A] {{.*}} [def]
4 class A {
5 public:
6   int z;
7 };
8
9 A *foo (A* x) {
10   A *a = new A(*x);
11   return a;
12 }
13
14 // Verify that we're not emitting a full definition of B in limit debug mode.
15 // CHECK: ; [ DW_TAG_class_type ] [B] {{.*}} [decl]
16
17 class B {
18 public:
19   int y;
20 };
21
22 extern int bar(B *b);
23 int baz(B *b) {
24   return bar(b);
25 }
26
27
28 // CHECK: ; [ DW_TAG_structure_type ] [C] {{.*}} [decl]
29
30 struct C {
31 };
32
33 C (*x)(C);