blob: 25e8f350b05573ddee5c5f7ff6002993c78b64e8 [file] [log] [blame]
Stephen Hines651f13c2014-04-23 16:59:28 -07001// RUN: %clang_cc1 -triple %itanium_abi_triple -emit-llvm -g %s -o - | FileCheck %s
2
3struct A
4{
Stephen Hines0e2c34f2015-03-23 12:09:02 -07005 // CHECK-DAG: !"0x2e\00a\00a\00_ZN1A1aEiz\00[[@LINE+1]]\00{{[^,]*}}"{{, [^,]+, [^,]+}}, ![[ATY:[0-9]+]]{{.*}}[ DW_TAG_subprogram ]{{.*}}[a]
Stephen Hines651f13c2014-04-23 16:59:28 -07006 void a(int c, ...) {}
Stephen Hines0e2c34f2015-03-23 12:09:02 -07007 // CHECK: ![[ATY]] ={{.*}} ![[AARGS:[0-9]+]], null, null, null} ; [ DW_TAG_subroutine_type ]
Stephen Hines176edba2014-12-01 14:53:08 -08008 // We no longer use an explicit unspecified parameter. Instead we use a trailing null to mean the function is variadic.
Stephen Hines0e2c34f2015-03-23 12:09:02 -07009 // CHECK: ![[AARGS]] = !{null, !{{[0-9]+}}, !{{[0-9]+}}, null}
Stephen Hines651f13c2014-04-23 16:59:28 -070010};
11
Stephen Hines0e2c34f2015-03-23 12:09:02 -070012 // CHECK: !"0x2e\00b\00b\00_Z1biz\00[[@LINE+1]]\00{{[^,]*}}"{{, [^,]+, [^,]+}}, ![[BTY:[0-9]+]]{{.*}}[ DW_TAG_subprogram ]{{.*}}[b]
Stephen Hines651f13c2014-04-23 16:59:28 -070013void b(int c, ...) {
Stephen Hines0e2c34f2015-03-23 12:09:02 -070014 // CHECK: ![[BTY]] ={{.*}} ![[BARGS:[0-9]+]], null, null, null} ; [ DW_TAG_subroutine_type ]
15 // CHECK: ![[BARGS]] = !{null, !{{[0-9]+}}, null}
Stephen Hines651f13c2014-04-23 16:59:28 -070016
17 A a;
18
Stephen Hines0e2c34f2015-03-23 12:09:02 -070019 // CHECK: !"0x100\00fptr\00[[@LINE+1]]\000"{{, [^,]+, [^,]+}}, ![[PST:[0-9]+]]} ; [ DW_TAG_auto_variable ] [fptr] [line [[@LINE+1]]]
Stephen Hines651f13c2014-04-23 16:59:28 -070020 void (*fptr)(int, ...) = b;
Stephen Hines0e2c34f2015-03-23 12:09:02 -070021 // CHECK: ![[PST]] ={{.*}} ![[BTY]]} ; [ DW_TAG_pointer_type ]
Stephen Hines651f13c2014-04-23 16:59:28 -070022}