blob: 131693b21a57e6dba23d4eb65587ee2e7a008830 [file] [log] [blame]
David Blaikie9417b052012-11-02 20:49:01 +00001// RUN: %clang -emit-llvm -g -S %s -o - | FileCheck %s
2struct foo;
3void func(foo *f) { // CHECK: DW_TAG_structure_type
4}
5class bar;
6void func(bar *f) { // CHECK: DW_TAG_class_type
7}
8union baz;
9void func(baz *f) { // CHECK: DW_TAG_union_type
10}
David Blaikiec9a91772012-12-13 22:29:06 +000011class B { // CHECK: DW_TAG_class_type
12public:
13 virtual ~B();
14// CHECK: metadata !"_vptr$B", {{.*}}, i32 64, metadata !{{.*}}} ; [ DW_TAG_member ]
15};
David Blaikie70ae1222012-11-02 23:40:00 +000016struct A { // CHECK: DW_TAG_structure_type
Devang Pateldabc3e92010-08-12 00:02:44 +000017 int one;
David Blaikie9417b052012-11-02 20:49:01 +000018 static const int HdrSize = 52; // CHECK: HdrSize
Devang Pateldabc3e92010-08-12 00:02:44 +000019 int two;
20 A() {
21 int x = 1;
22 }
23};
David Blaikiec9a91772012-12-13 22:29:06 +000024
25
Devang Pateldabc3e92010-08-12 00:02:44 +000026int main() {
27 A a;
David Blaikie9417b052012-11-02 20:49:01 +000028 B b;
Devang Pateldabc3e92010-08-12 00:02:44 +000029}