1*0a6a1f1dSLionel Sambuc // RUN: %clang_cc1 -triple %itanium_abi_triple -emit-llvm -g %s -o - | FileCheck %s
2*0a6a1f1dSLionel Sambuc
3*0a6a1f1dSLionel Sambuc struct A
4*0a6a1f1dSLionel Sambuc {
5*0a6a1f1dSLionel Sambuc // CHECK-DAG: !"0x2e\00a\00a\00_ZN1A1aEiz\00[[@LINE+1]]\00{{[^,]*}}"{{, [^,]+, [^,]+}}, ![[ATY:[0-9]+]]{{.*}}[ DW_TAG_subprogram ]{{.*}}[a]
aA6*0a6a1f1dSLionel Sambuc void a(int c, ...) {}
7*0a6a1f1dSLionel Sambuc // CHECK: ![[ATY]] ={{.*}} ![[AARGS:[0-9]+]], null, null, null} ; [ DW_TAG_subroutine_type ]
8*0a6a1f1dSLionel Sambuc // We no longer use an explicit unspecified parameter. Instead we use a trailing null to mean the function is variadic.
9*0a6a1f1dSLionel Sambuc // CHECK: ![[AARGS]] = !{null, !{{[0-9]+}}, !{{[0-9]+}}, null}
10*0a6a1f1dSLionel Sambuc };
11*0a6a1f1dSLionel Sambuc
12*0a6a1f1dSLionel Sambuc // CHECK: !"0x2e\00b\00b\00_Z1biz\00[[@LINE+1]]\00{{[^,]*}}"{{, [^,]+, [^,]+}}, ![[BTY:[0-9]+]]{{.*}}[ DW_TAG_subprogram ]{{.*}}[b]
b(int c,...)13*0a6a1f1dSLionel Sambuc void b(int c, ...) {
14*0a6a1f1dSLionel Sambuc // CHECK: ![[BTY]] ={{.*}} ![[BARGS:[0-9]+]], null, null, null} ; [ DW_TAG_subroutine_type ]
15*0a6a1f1dSLionel Sambuc // CHECK: ![[BARGS]] = !{null, !{{[0-9]+}}, null}
16*0a6a1f1dSLionel Sambuc
17*0a6a1f1dSLionel Sambuc A a;
18*0a6a1f1dSLionel Sambuc
19*0a6a1f1dSLionel Sambuc // CHECK: !"0x100\00fptr\00[[@LINE+1]]\000"{{, [^,]+, [^,]+}}, ![[PST:[0-9]+]]} ; [ DW_TAG_auto_variable ] [fptr] [line [[@LINE+1]]]
20*0a6a1f1dSLionel Sambuc void (*fptr)(int, ...) = b;
21*0a6a1f1dSLionel Sambuc // CHECK: ![[PST]] ={{.*}} ![[BTY]]} ; [ DW_TAG_pointer_type ]
22*0a6a1f1dSLionel Sambuc }
23