2013-08-02 04:57:40 +08:00
|
|
|
// RUN: %clang -flimit-debug-info -emit-llvm -g -S %s -o - | FileCheck %s
|
2011-02-23 04:55:26 +08:00
|
|
|
|
2015-04-30 00:40:08 +08:00
|
|
|
// CHECK: !DICompositeType(tag: DW_TAG_class_type, name: "A"
|
2015-03-04 01:25:55 +08:00
|
|
|
// CHECK-NOT: DIFlagFwdDecl
|
|
|
|
// CHECK-SAME: ){{$}}
|
2011-02-23 04:55:26 +08:00
|
|
|
class A {
|
|
|
|
public:
|
|
|
|
int z;
|
|
|
|
};
|
|
|
|
|
2012-02-17 06:45:48 +08:00
|
|
|
A *foo (A* x) {
|
|
|
|
A *a = new A(*x);
|
2011-02-23 04:55:26 +08:00
|
|
|
return a;
|
|
|
|
}
|
|
|
|
|
2015-04-30 00:40:08 +08:00
|
|
|
// CHECK: !DICompositeType(tag: DW_TAG_class_type, name: "B"
|
2015-03-04 01:25:55 +08:00
|
|
|
// CHECK-NOT: DIFlagFwdDecl
|
|
|
|
// CHECK-SAME: ){{$}}
|
2013-05-16 08:45:20 +08:00
|
|
|
|
|
|
|
class B {
|
|
|
|
public:
|
|
|
|
int y;
|
|
|
|
};
|
|
|
|
|
|
|
|
extern int bar(B *b);
|
|
|
|
int baz(B *b) {
|
|
|
|
return bar(b);
|
|
|
|
}
|
|
|
|
|
2013-08-22 07:23:07 +08:00
|
|
|
|
2015-04-30 00:40:08 +08:00
|
|
|
// CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "C"
|
2015-03-04 01:25:55 +08:00
|
|
|
// CHECK-SAME: flags: DIFlagFwdDecl
|
2013-08-22 07:23:07 +08:00
|
|
|
|
|
|
|
struct C {
|
|
|
|
};
|
|
|
|
|
|
|
|
C (*x)(C);
|