Home | History | Annotate | Download | only in CodeGenCXX
      1 struct foo;
      2 void func(foo *f) {
      3 }
      4 class bar;
      5 void func(bar *f) {
      6 }
      7 union baz;
      8 void func(baz *f) {
      9 }
     10 
     11 class B {
     12 public:
     13   virtual ~B();
     14 };
     15 struct A {
     16   int one;
     17   static const int HdrSize = 52;
     18   int two;
     19   A() {
     20     int x = 1;
     21   }
     22 };
     23 
     24 
     25 int main(int argc, char **argv) {
     26   B b;
     27   if (argc) {
     28     A a;
     29   }
     30   return 0;
     31 }
     32 
     33 // RUN: %clang -target x86_64-unknown_unknown -emit-llvm -g -S %s -o - | FileCheck %s
     34 // RUN: %clang -target i686-cygwin -emit-llvm -g -S %s -o - | FileCheck %s
     35 // RUN: %clang -target armv7l-unknown-linux-gnueabihf -emit-llvm -g -S %s -o - | FileCheck %s
     36 
     37 // CHECK: invoke {{.+}} @_ZN1BD1Ev(%class.B* %b)
     38 // CHECK-NEXT: unwind label %{{.+}}, !dbg ![[EXCEPTLOC:.*]]
     39 // CHECK: store i32 0, i32* %{{.+}}, !dbg ![[RETLOC:.*]]
     40 // CHECK: DW_TAG_structure_type ] [foo]
     41 // CHECK: DW_TAG_class_type ] [bar]
     42 // CHECK: DW_TAG_union_type ] [baz]
     43 // CHECK: DW_TAG_structure_type ] [A]
     44 // CHECK: HdrSize
     45 // CHECK: DW_TAG_class_type ] [B]
     46 // CHECK: metadata !"_vptr$B", {{.*}}, i32 64, metadata !{{.*}}} ; [ DW_TAG_member ]
     47 // CHECK: ![[EXCEPTLOC]] = metadata !{i32 31,
     48 // CHECK: ![[RETLOC]] = metadata !{i32 30,
     49