1*0a6a1f1dSLionel Sambuc // RUN: %clang_cc1 -emit-llvm -g -triple %itanium_abi_triple %s -o - | FileCheck %s 2*0a6a1f1dSLionel Sambuc // Test the various accessibility flags in the debug info. 3*0a6a1f1dSLionel Sambuc struct A { 4*0a6a1f1dSLionel Sambuc // CHECK-DAG: [ DW_TAG_subprogram ] [line [[@LINE+1]]] [pub_default] 5*0a6a1f1dSLionel Sambuc void pub_default(); 6*0a6a1f1dSLionel Sambuc // CHECK-DAG: [ DW_TAG_member ] [pub_default_static] [line [[@LINE+1]]{{.*}}offset 0] [static] 7*0a6a1f1dSLionel Sambuc static int pub_default_static; 8*0a6a1f1dSLionel Sambuc }; 9*0a6a1f1dSLionel Sambuc 10*0a6a1f1dSLionel Sambuc // CHECK: [ DW_TAG_inheritance ] {{.*}} [public] [from {{.*}}A] 11*0a6a1f1dSLionel Sambuc class B : public A { 12*0a6a1f1dSLionel Sambuc public: 13*0a6a1f1dSLionel Sambuc // CHECK-DAG: [ DW_TAG_subprogram ] [line [[@LINE+1]]] [public] [pub] 14*0a6a1f1dSLionel Sambuc void pub(); 15*0a6a1f1dSLionel Sambuc // CHECK-DAG: [ DW_TAG_member ] [public_static] [line [[@LINE+1]]{{.*}} [public] [static] 16*0a6a1f1dSLionel Sambuc static int public_static; 17*0a6a1f1dSLionel Sambuc protected: 18*0a6a1f1dSLionel Sambuc // CHECK: [ DW_TAG_subprogram ] [line [[@LINE+1]]] [protected] [prot] 19*0a6a1f1dSLionel Sambuc void prot(); 20*0a6a1f1dSLionel Sambuc private: 21*0a6a1f1dSLionel Sambuc // CHECK: [ DW_TAG_subprogram ] [line [[@LINE+1]]] [priv_default] 22*0a6a1f1dSLionel Sambuc void priv_default(); 23*0a6a1f1dSLionel Sambuc }; 24*0a6a1f1dSLionel Sambuc 25*0a6a1f1dSLionel Sambuc union U { 26*0a6a1f1dSLionel Sambuc // CHECK-DAG: [ DW_TAG_subprogram ] [line [[@LINE+1]]] [union_pub_default] 27*0a6a1f1dSLionel Sambuc void union_pub_default(); 28*0a6a1f1dSLionel Sambuc private: 29*0a6a1f1dSLionel Sambuc // CHECK-DAG: [ DW_TAG_member ] [union_priv] [line [[@LINE+1]]{{.*}} [private] 30*0a6a1f1dSLionel Sambuc int union_priv; 31*0a6a1f1dSLionel Sambuc }; 32*0a6a1f1dSLionel Sambuc 33*0a6a1f1dSLionel Sambuc 34*0a6a1f1dSLionel Sambuc // CHECK: {{.*}}\00256\00{{.*}} ; [ DW_TAG_subprogram ] [line [[@LINE+1]]] [def] [free] free()35*0a6a1f1dSLionel Sambucvoid free() {} 36*0a6a1f1dSLionel Sambuc 37*0a6a1f1dSLionel Sambuc A a; 38*0a6a1f1dSLionel Sambuc B b; 39*0a6a1f1dSLionel Sambuc U u; 40