Home | History | Annotate | Download | only in CodeGenCXX
      1 // RUN: %clang_cc1 -triple %itanium_abi_triple -emit-llvm -g %s -o - | FileCheck %s
      2 
      3 struct A
      4 {
      5   // CHECK: !MDSubprogram(name: "a", linkageName: "_ZN1A1aEiz"
      6   // CHECK-SAME:          line: [[@LINE+2]]
      7   // CHECK-SAME:          type: ![[ATY:[0-9]+]]
      8   void a(int c, ...) {}
      9   // CHECK: ![[ATY]] = !MDSubroutineType(types: ![[AARGS:[0-9]+]])
     10   // We no longer use an explicit unspecified parameter. Instead we use a trailing null to mean the function is variadic.
     11   // CHECK: ![[AARGS]] = !{null, !{{[0-9]+}}, !{{[0-9]+}}, null}
     12 };
     13 
     14   // CHECK: !MDSubprogram(name: "b", linkageName: "_Z1biz"
     15   // CHECK-SAME:          line: [[@LINE+2]]
     16   // CHECK-SAME:          type: ![[BTY:[0-9]+]]
     17 void b(int c, ...) {
     18   // CHECK: ![[BTY]] = !MDSubroutineType(types: ![[BARGS:[0-9]+]])
     19   // CHECK: ![[BARGS]] = !{null, !{{[0-9]+}}, null}
     20 
     21   A a;
     22 
     23   // CHECK: !MDLocalVariable(tag: DW_TAG_auto_variable, name: "fptr"
     24   // CHECK-SAME:             line: [[@LINE+2]]
     25   // CHECK-SAME:             type: ![[PST:[0-9]+]]
     26   void (*fptr)(int, ...) = b;
     27   // CHECK: ![[PST]] = !MDDerivedType(tag: DW_TAG_pointer_type, baseType: ![[BTY]],
     28 }
     29