1// RUN: %clang_cc1 -triple %itanium_abi_triple -emit-llvm -debug-info-kind=limited %s -o - | FileCheck %s 2 3struct A 4{ 5 void a(int c, ...) {} 6}; 7 8 // CHECK: !DISubprogram(name: "b", linkageName: "_Z1biz" 9 // CHECK-SAME: line: [[@LINE+2]] 10 // CHECK-SAME: type: ![[BTY:[0-9]+]] 11void b(int c, ...) { 12 // CHECK: ![[BTY]] = !DISubroutineType(types: ![[BARGS:[0-9]+]]) 13 // CHECK: ![[BARGS]] = !{null, !{{[0-9]+}}, null} 14 15 // The subprogram "a" comes after "b" because the function comes later. 16 // CHECK: !DISubprogram(name: "a", linkageName: "_ZN1A1aEiz" 17 // CHECK-SAME: line: 5, 18 // CHECK-SAME: type: ![[ATY:[0-9]+]] 19 // CHECK: ![[ATY]] = !DISubroutineType(types: ![[AARGS:[0-9]+]]) 20 // We no longer use an explicit unspecified parameter. Instead we use a trailing null to mean the function is variadic. 21 // CHECK: ![[AARGS]] = !{null, !{{[0-9]+}}, !{{[0-9]+}}, null} 22 23 A a; 24 25 // CHECK: !DILocalVariable(name: "fptr" 26 // CHECK-SAME: line: [[@LINE+2]] 27 // CHECK-SAME: type: ![[PST:[0-9]+]] 28 void (*fptr)(int, ...) = b; 29 // CHECK: ![[PST]] = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: ![[BTY]], 30} 31