David Blaikie | 9417b05 | 2012-11-02 20:49:01 +0000 | [diff] [blame] | 1 | // RUN: %clang -emit-llvm -g -S %s -o - | FileCheck %s |
| 2 | struct foo; |
| 3 | void func(foo *f) { // CHECK: DW_TAG_structure_type |
| 4 | } |
| 5 | class bar; |
| 6 | void func(bar *f) { // CHECK: DW_TAG_class_type |
| 7 | } |
| 8 | union baz; |
| 9 | void func(baz *f) { // CHECK: DW_TAG_union_type |
| 10 | } |
David Blaikie | c9a9177 | 2012-12-13 22:29:06 +0000 | [diff] [blame^] | 11 | class B { // CHECK: DW_TAG_class_type |
| 12 | public: |
| 13 | virtual ~B(); |
| 14 | // CHECK: metadata !"_vptr$B", {{.*}}, i32 64, metadata !{{.*}}} ; [ DW_TAG_member ] |
| 15 | }; |
David Blaikie | 70ae122 | 2012-11-02 23:40:00 +0000 | [diff] [blame] | 16 | struct A { // CHECK: DW_TAG_structure_type |
Devang Patel | dabc3e9 | 2010-08-12 00:02:44 +0000 | [diff] [blame] | 17 | int one; |
David Blaikie | 9417b05 | 2012-11-02 20:49:01 +0000 | [diff] [blame] | 18 | static const int HdrSize = 52; // CHECK: HdrSize |
Devang Patel | dabc3e9 | 2010-08-12 00:02:44 +0000 | [diff] [blame] | 19 | int two; |
| 20 | A() { |
| 21 | int x = 1; |
| 22 | } |
| 23 | }; |
David Blaikie | c9a9177 | 2012-12-13 22:29:06 +0000 | [diff] [blame^] | 24 | |
| 25 | |
Devang Patel | dabc3e9 | 2010-08-12 00:02:44 +0000 | [diff] [blame] | 26 | int main() { |
| 27 | A a; |
David Blaikie | 9417b05 | 2012-11-02 20:49:01 +0000 | [diff] [blame] | 28 | B b; |
Devang Patel | dabc3e9 | 2010-08-12 00:02:44 +0000 | [diff] [blame] | 29 | } |