debug-info-artificial-arg.cpp revision 2b6eb9db86252ddde0e79a1d97054de6cbe1b284
1// RUN: %clang_cc1 -emit-llvm -g -triple x86_64-apple-darwin %s -o - | FileCheck %s
2
3template<class X> class B {
4public:
5  explicit B(X* p = 0);
6};
7
8class A
9{
10public:
11  A(int value) : m_a_value(value) {};
12  A(int value, A* client_A) : m_a_value (value), m_client_A (client_A) {}
13
14  virtual ~A() {}
15
16private:
17  int m_a_value;
18  B<A> m_client_A;
19};
20
21int main(int argc, char **argv) {
22  A reallyA (500);
23}
24
25// FIXME: The numbers are truly awful.
26// CHECK: !16 = metadata !{i32 786447, i32 0, metadata !"", i32 0, i32 0, i64 64, i64 64, i64 0, i32 1088, metadata !17} ; [ DW_TAG_pointer_type ] [line 0, size 64, align 64, offset 0] [from A]
27// CHECK: !17 = metadata !{i32 {{.*}}, null, metadata !"A", metadata !6, i32 8, i64 128, i64 64, i32 0, i32 0, null, metadata !18, i32 0, metadata !17, null} ; [ DW_TAG_class_type ]
28// CHECK: metadata !17, metadata !"A", metadata !"A", metadata !"", metadata !6, i32 12, metadata !43, i1 false, i1 false, i32 0, i32 0, null, i32 256, i1 false, null, null, i32 0, metadata !45, i32 12} ; [ DW_TAG_subprogram ]
29// CHECK: metadata !"", i32 0, i32 0, i64 0, i64 0, i64 0, i32 0, null, metadata !44, i32 0, i32 0} ; [ DW_TAG_subroutine_type ]
30// CHECK: !44 = metadata !{null, metadata !16, metadata !9, metadata !32}
31