1*9880d681SAndroid Build Coastguard Worker; RUN: llc -mtriple=x86_64-pc-linux-gnu -generate-gnu-dwarf-pub-sections < %s | FileCheck -check-prefix=ASM %s 2*9880d681SAndroid Build Coastguard Worker; RUN: llc -mtriple=x86_64-pc-linux-gnu -generate-gnu-dwarf-pub-sections -filetype=obj < %s | llvm-dwarfdump - | FileCheck %s 3*9880d681SAndroid Build Coastguard Worker; ModuleID = 'dwarf-public-names.cpp' 4*9880d681SAndroid Build Coastguard Worker; 5*9880d681SAndroid Build Coastguard Worker; Generated from: 6*9880d681SAndroid Build Coastguard Worker; 7*9880d681SAndroid Build Coastguard Worker; struct C { 8*9880d681SAndroid Build Coastguard Worker; void member_function(); 9*9880d681SAndroid Build Coastguard Worker; static int static_member_function(); 10*9880d681SAndroid Build Coastguard Worker; static int static_member_variable; 11*9880d681SAndroid Build Coastguard Worker; }; 12*9880d681SAndroid Build Coastguard Worker; 13*9880d681SAndroid Build Coastguard Worker; int C::static_member_variable = 0; 14*9880d681SAndroid Build Coastguard Worker; 15*9880d681SAndroid Build Coastguard Worker; void C::member_function() { 16*9880d681SAndroid Build Coastguard Worker; static_member_variable = 0; 17*9880d681SAndroid Build Coastguard Worker; } 18*9880d681SAndroid Build Coastguard Worker; 19*9880d681SAndroid Build Coastguard Worker; int C::static_member_function() { 20*9880d681SAndroid Build Coastguard Worker; return static_member_variable; 21*9880d681SAndroid Build Coastguard Worker; } 22*9880d681SAndroid Build Coastguard Worker; 23*9880d681SAndroid Build Coastguard Worker; C global_variable; 24*9880d681SAndroid Build Coastguard Worker; 25*9880d681SAndroid Build Coastguard Worker; int global_function() { 26*9880d681SAndroid Build Coastguard Worker; return -1; 27*9880d681SAndroid Build Coastguard Worker; } 28*9880d681SAndroid Build Coastguard Worker; 29*9880d681SAndroid Build Coastguard Worker; namespace ns { 30*9880d681SAndroid Build Coastguard Worker; void global_namespace_function() { 31*9880d681SAndroid Build Coastguard Worker; global_variable.member_function(); 32*9880d681SAndroid Build Coastguard Worker; } 33*9880d681SAndroid Build Coastguard Worker; int global_namespace_variable = 1; 34*9880d681SAndroid Build Coastguard Worker; extern int global_namespace_variable_decl; 35*9880d681SAndroid Build Coastguard Worker; struct D { 36*9880d681SAndroid Build Coastguard Worker; int A; 37*9880d681SAndroid Build Coastguard Worker; } d; 38*9880d681SAndroid Build Coastguard Worker; } 39*9880d681SAndroid Build Coastguard Worker; 40*9880d681SAndroid Build Coastguard Worker; using ns::global_namespace_variable_decl; 41*9880d681SAndroid Build Coastguard Worker; 42*9880d681SAndroid Build Coastguard Worker; namespace { 43*9880d681SAndroid Build Coastguard Worker; int i; 44*9880d681SAndroid Build Coastguard Worker; } 45*9880d681SAndroid Build Coastguard Worker; 46*9880d681SAndroid Build Coastguard Worker; int *f3() { 47*9880d681SAndroid Build Coastguard Worker; static int z; 48*9880d681SAndroid Build Coastguard Worker; return &z; 49*9880d681SAndroid Build Coastguard Worker; } 50*9880d681SAndroid Build Coastguard Worker; 51*9880d681SAndroid Build Coastguard Worker; namespace { 52*9880d681SAndroid Build Coastguard Worker; namespace inner { 53*9880d681SAndroid Build Coastguard Worker; int b; 54*9880d681SAndroid Build Coastguard Worker; } 55*9880d681SAndroid Build Coastguard Worker; } 56*9880d681SAndroid Build Coastguard Worker; 57*9880d681SAndroid Build Coastguard Worker; namespace outer { 58*9880d681SAndroid Build Coastguard Worker; namespace { 59*9880d681SAndroid Build Coastguard Worker; int c; 60*9880d681SAndroid Build Coastguard Worker; } 61*9880d681SAndroid Build Coastguard Worker; } 62*9880d681SAndroid Build Coastguard Worker; 63*9880d681SAndroid Build Coastguard Worker; int f7() { 64*9880d681SAndroid Build Coastguard Worker; return i + *f3() + inner::b + outer::c; 65*9880d681SAndroid Build Coastguard Worker; } 66*9880d681SAndroid Build Coastguard Worker 67*9880d681SAndroid Build Coastguard Worker; ASM: .section .debug_gnu_pubnames 68*9880d681SAndroid Build Coastguard Worker; ASM: .byte 32 # Kind: VARIABLE, EXTERNAL 69*9880d681SAndroid Build Coastguard Worker; ASM-NEXT: .asciz "global_variable" # External Name 70*9880d681SAndroid Build Coastguard Worker 71*9880d681SAndroid Build Coastguard Worker; ASM: .section .debug_gnu_pubtypes 72*9880d681SAndroid Build Coastguard Worker; ASM: .byte 16 # Kind: TYPE, EXTERNAL 73*9880d681SAndroid Build Coastguard Worker; ASM-NEXT: .asciz "C" # External Name 74*9880d681SAndroid Build Coastguard Worker 75*9880d681SAndroid Build Coastguard Worker; CHECK: .debug_info contents: 76*9880d681SAndroid Build Coastguard Worker; CHECK: Compile Unit: 77*9880d681SAndroid Build Coastguard Worker; CHECK: DW_AT_GNU_pubnames [DW_FORM_flag_present] (true) 78*9880d681SAndroid Build Coastguard Worker; CHECK-NOT: DW_AT_GNU_pubtypes [ 79*9880d681SAndroid Build Coastguard Worker 80*9880d681SAndroid Build Coastguard Worker; CHECK: [[STATIC_MEM_VAR:0x[0-9a-f]+]]: DW_TAG_variable 81*9880d681SAndroid Build Coastguard Worker; CHECK-NEXT: DW_AT_specification {{.*}} "static_member_variable" 82*9880d681SAndroid Build Coastguard Worker 83*9880d681SAndroid Build Coastguard Worker; CHECK: [[C:0x[0-9a-f]+]]: DW_TAG_structure_type 84*9880d681SAndroid Build Coastguard Worker; CHECK-NEXT: DW_AT_name {{.*}} "C" 85*9880d681SAndroid Build Coastguard Worker 86*9880d681SAndroid Build Coastguard Worker; CHECK: DW_TAG_member 87*9880d681SAndroid Build Coastguard Worker; CHECK-NEXT: DW_AT_name {{.*}} "static_member_variable" 88*9880d681SAndroid Build Coastguard Worker 89*9880d681SAndroid Build Coastguard Worker; CHECK: DW_TAG_subprogram 90*9880d681SAndroid Build Coastguard Worker; CHECK-NEXT: DW_AT_linkage_name 91*9880d681SAndroid Build Coastguard Worker; CHECK-NEXT: DW_AT_name {{.*}} "member_function" 92*9880d681SAndroid Build Coastguard Worker 93*9880d681SAndroid Build Coastguard Worker; CHECK: DW_TAG_subprogram 94*9880d681SAndroid Build Coastguard Worker; CHECK-NEXT: DW_AT_linkage_name 95*9880d681SAndroid Build Coastguard Worker; CHECK-NEXT: DW_AT_name {{.*}} "static_member_function" 96*9880d681SAndroid Build Coastguard Worker 97*9880d681SAndroid Build Coastguard Worker; CHECK: [[INT:0x[0-9a-f]+]]: DW_TAG_base_type 98*9880d681SAndroid Build Coastguard Worker; CHECK-NEXT: DW_AT_name {{.*}} "int" 99*9880d681SAndroid Build Coastguard Worker 100*9880d681SAndroid Build Coastguard Worker; CHECK: [[GLOB_VAR:0x[0-9a-f]+]]: DW_TAG_variable 101*9880d681SAndroid Build Coastguard Worker; CHECK-NEXT: DW_AT_name {{.*}} "global_variable" 102*9880d681SAndroid Build Coastguard Worker 103*9880d681SAndroid Build Coastguard Worker; CHECK: [[NS:0x[0-9a-f]+]]: DW_TAG_namespace 104*9880d681SAndroid Build Coastguard Worker; CHECK-NEXT: DW_AT_name {{.*}} "ns" 105*9880d681SAndroid Build Coastguard Worker 106*9880d681SAndroid Build Coastguard Worker; CHECK: [[GLOB_NS_VAR:0x[0-9a-f]+]]: DW_TAG_variable 107*9880d681SAndroid Build Coastguard Worker; CHECK-NEXT: DW_AT_name {{.*}} "global_namespace_variable" 108*9880d681SAndroid Build Coastguard Worker; CHECK-NOT: DW_AT_specification 109*9880d681SAndroid Build Coastguard Worker; CHECK: DW_AT_location 110*9880d681SAndroid Build Coastguard Worker; CHECK-NOT: DW_AT_specification 111*9880d681SAndroid Build Coastguard Worker 112*9880d681SAndroid Build Coastguard Worker; CHECK: [[D_VAR:0x[0-9a-f]+]]: DW_TAG_variable 113*9880d681SAndroid Build Coastguard Worker; CHECK-NEXT: DW_AT_name {{.*}} "d" 114*9880d681SAndroid Build Coastguard Worker; CHECK-NOT: DW_AT_specification 115*9880d681SAndroid Build Coastguard Worker; CHECK: DW_AT_location 116*9880d681SAndroid Build Coastguard Worker; CHECK-NOT: DW_AT_specification 117*9880d681SAndroid Build Coastguard Worker 118*9880d681SAndroid Build Coastguard Worker; CHECK: [[D:0x[0-9a-f]+]]: DW_TAG_structure_type 119*9880d681SAndroid Build Coastguard Worker; CHECK-NEXT: DW_AT_name {{.*}} "D" 120*9880d681SAndroid Build Coastguard Worker 121*9880d681SAndroid Build Coastguard Worker; CHECK: [[GLOB_NS_FUNC:0x[0-9a-f]+]]: DW_TAG_subprogram 122*9880d681SAndroid Build Coastguard Worker; CHECK-NOT: DW_TAG 123*9880d681SAndroid Build Coastguard Worker; CHECK: DW_AT_linkage_name 124*9880d681SAndroid Build Coastguard Worker; CHECK-NOT: DW_TAG 125*9880d681SAndroid Build Coastguard Worker; CHECK: DW_AT_name {{.*}} "global_namespace_function" 126*9880d681SAndroid Build Coastguard Worker 127*9880d681SAndroid Build Coastguard Worker; CHECK: DW_TAG_subprogram 128*9880d681SAndroid Build Coastguard Worker; CHECK-NOT: DW_TAG 129*9880d681SAndroid Build Coastguard Worker; CHECK: DW_AT_name {{.*}} "f3" 130*9880d681SAndroid Build Coastguard Worker; CHECK-NOT: {{DW_TAG|NULL}} 131*9880d681SAndroid Build Coastguard Worker; CHECK: [[F3_Z:.*]]: DW_TAG_variable 132*9880d681SAndroid Build Coastguard Worker; CHECK-NOT: DW_TAG 133*9880d681SAndroid Build Coastguard Worker; CHECK: DW_AT_name {{.*}} "z" 134*9880d681SAndroid Build Coastguard Worker; CHECK-NOT: {{DW_TAG|NULL}} 135*9880d681SAndroid Build Coastguard Worker; CHECK: DW_AT_location 136*9880d681SAndroid Build Coastguard Worker; CHECK-NOT: {{DW_TAG|NULL}} 137*9880d681SAndroid Build Coastguard Worker; CHECK: NULL 138*9880d681SAndroid Build Coastguard Worker; CHECK-NOT: {{DW_TAG|NULL}} 139*9880d681SAndroid Build Coastguard Worker 140*9880d681SAndroid Build Coastguard Worker; CHECK: [[ANON:.*]]: DW_TAG_namespace 141*9880d681SAndroid Build Coastguard Worker; CHECK-NOT: DW_AT_name 142*9880d681SAndroid Build Coastguard Worker; CHECK: [[ANON_I:.*]]: DW_TAG_variable 143*9880d681SAndroid Build Coastguard Worker; CHECK-NOT: DW_TAG 144*9880d681SAndroid Build Coastguard Worker; CHECK: DW_AT_name {{.*}} "i" 145*9880d681SAndroid Build Coastguard Worker; CHECK-NOT: {{DW_TAG|NULL}} 146*9880d681SAndroid Build Coastguard Worker; CHECK: [[ANON_INNER:.*]]: DW_TAG_namespace 147*9880d681SAndroid Build Coastguard Worker; CHECK-NOT: DW_TAG 148*9880d681SAndroid Build Coastguard Worker; CHECK: DW_AT_name {{.*}} "inner" 149*9880d681SAndroid Build Coastguard Worker; CHECK-NOT: {{DW_TAG|NULL}} 150*9880d681SAndroid Build Coastguard Worker; CHECK: [[ANON_INNER_B:.*]]: DW_TAG_variable 151*9880d681SAndroid Build Coastguard Worker; CHECK-NOT: DW_TAG 152*9880d681SAndroid Build Coastguard Worker; CHECK: DW_AT_name {{.*}} "b" 153*9880d681SAndroid Build Coastguard Worker; CHECK-NOT: {{DW_TAG|NULL}} 154*9880d681SAndroid Build Coastguard Worker; CHECK: NULL 155*9880d681SAndroid Build Coastguard Worker; CHECK-NOT: {{DW_TAG|NULL}} 156*9880d681SAndroid Build Coastguard Worker; CHECK: NULL 157*9880d681SAndroid Build Coastguard Worker; CHECK-NOT: {{DW_TAG|NULL}} 158*9880d681SAndroid Build Coastguard Worker 159*9880d681SAndroid Build Coastguard Worker; CHECK: [[OUTER:.*]]: DW_TAG_namespace 160*9880d681SAndroid Build Coastguard Worker; CHECK-NOT: DW_TAG 161*9880d681SAndroid Build Coastguard Worker; CHECK: DW_AT_name {{.*}} "outer" 162*9880d681SAndroid Build Coastguard Worker; CHECK-NOT: {{DW_TAG|NULL}} 163*9880d681SAndroid Build Coastguard Worker; CHECK: [[OUTER_ANON:.*]]: DW_TAG_namespace 164*9880d681SAndroid Build Coastguard Worker; CHECK-NOT: {{DW_TAG|NULL}} 165*9880d681SAndroid Build Coastguard Worker; CHECK-NOT: DW_AT_name 166*9880d681SAndroid Build Coastguard Worker; CHECK: [[OUTER_ANON_C:.*]]: DW_TAG_variable 167*9880d681SAndroid Build Coastguard Worker; CHECK-NOT: DW_TAG 168*9880d681SAndroid Build Coastguard Worker; CHECK: DW_AT_name {{.*}} "c" 169*9880d681SAndroid Build Coastguard Worker; CHECK-NOT: {{DW_TAG|NULL}} 170*9880d681SAndroid Build Coastguard Worker; CHECK: NULL 171*9880d681SAndroid Build Coastguard Worker; CHECK-NOT: {{DW_TAG|NULL}} 172*9880d681SAndroid Build Coastguard Worker; FIXME: We probably shouldn't bother describing the implicit 173*9880d681SAndroid Build Coastguard Worker; import of the preceding anonymous namespace. This should be fixed 174*9880d681SAndroid Build Coastguard Worker; in clang. 175*9880d681SAndroid Build Coastguard Worker; CHECK: DW_TAG_imported_module 176*9880d681SAndroid Build Coastguard Worker; CHECK-NOT: {{DW_TAG|NULL}} 177*9880d681SAndroid Build Coastguard Worker; CHECK: NULL 178*9880d681SAndroid Build Coastguard Worker; CHECK-NOT: {{DW_TAG|NULL}} 179*9880d681SAndroid Build Coastguard Worker 180*9880d681SAndroid Build Coastguard Worker; CHECK: DW_TAG_imported_declaration 181*9880d681SAndroid Build Coastguard Worker; CHECK-NOT: {{DW_TAG|NULL}} 182*9880d681SAndroid Build Coastguard Worker 183*9880d681SAndroid Build Coastguard Worker; CHECK: [[MEM_FUNC:0x[0-9a-f]+]]: DW_TAG_subprogram 184*9880d681SAndroid Build Coastguard Worker; CHECK-NOT: DW_TAG 185*9880d681SAndroid Build Coastguard Worker; CHECK: DW_AT_specification {{.*}} "_ZN1C15member_functionEv" 186*9880d681SAndroid Build Coastguard Worker 187*9880d681SAndroid Build Coastguard Worker; CHECK: [[STATIC_MEM_FUNC:0x[0-9a-f]+]]: DW_TAG_subprogram 188*9880d681SAndroid Build Coastguard Worker; CHECK-NOT: DW_TAG 189*9880d681SAndroid Build Coastguard Worker; CHECK: DW_AT_specification {{.*}} "_ZN1C22static_member_functionEv" 190*9880d681SAndroid Build Coastguard Worker 191*9880d681SAndroid Build Coastguard Worker; CHECK: [[GLOBAL_FUNC:0x[0-9a-f]+]]: DW_TAG_subprogram 192*9880d681SAndroid Build Coastguard Worker; CHECK-NOT: DW_TAG 193*9880d681SAndroid Build Coastguard Worker; CHECK: DW_AT_linkage_name 194*9880d681SAndroid Build Coastguard Worker; CHECK-NOT: DW_TAG 195*9880d681SAndroid Build Coastguard Worker; CHECK: DW_AT_name {{.*}} "global_function" 196*9880d681SAndroid Build Coastguard Worker 197*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: .debug_gnu_pubnames contents: 198*9880d681SAndroid Build Coastguard Worker; CHECK-NEXT: length = {{.*}} version = 0x0002 unit_offset = 0x00000000 unit_size = {{.*}} 199*9880d681SAndroid Build Coastguard Worker; CHECK-NEXT: Offset Linkage Kind Name 200*9880d681SAndroid Build Coastguard Worker; CHECK-NEXT: [[GLOBAL_FUNC]] EXTERNAL FUNCTION "global_function" 201*9880d681SAndroid Build Coastguard Worker; CHECK-NEXT: [[NS]] EXTERNAL TYPE "ns" 202*9880d681SAndroid Build Coastguard Worker; CHECK-NEXT: [[OUTER_ANON_C]] STATIC VARIABLE "outer::(anonymous namespace)::c" 203*9880d681SAndroid Build Coastguard Worker; CHECK-NEXT: [[ANON_I]] STATIC VARIABLE "(anonymous namespace)::i" 204*9880d681SAndroid Build Coastguard Worker; GCC Doesn't put local statics in pubnames, but it seems not unreasonable and 205*9880d681SAndroid Build Coastguard Worker; comes out naturally from LLVM's implementation, so I'm OK with it for now. If 206*9880d681SAndroid Build Coastguard Worker; it's demonstrated that this is a major size concern or degrades debug info 207*9880d681SAndroid Build Coastguard Worker; consumer behavior, feel free to change it. 208*9880d681SAndroid Build Coastguard Worker; CHECK-NEXT: [[F3_Z]] STATIC VARIABLE "f3::z" 209*9880d681SAndroid Build Coastguard Worker; CHECK-NEXT: [[ANON]] EXTERNAL TYPE "(anonymous namespace)" 210*9880d681SAndroid Build Coastguard Worker; CHECK-NEXT: [[OUTER_ANON]] EXTERNAL TYPE "outer::(anonymous namespace)" 211*9880d681SAndroid Build Coastguard Worker; CHECK-NEXT: [[ANON_INNER_B]] STATIC VARIABLE "(anonymous namespace)::inner::b" 212*9880d681SAndroid Build Coastguard Worker; CHECK-NEXT: [[OUTER]] EXTERNAL TYPE "outer" 213*9880d681SAndroid Build Coastguard Worker; CHECK-NEXT: [[MEM_FUNC]] EXTERNAL FUNCTION "C::member_function" 214*9880d681SAndroid Build Coastguard Worker; CHECK-NEXT: [[GLOB_VAR]] EXTERNAL VARIABLE "global_variable" 215*9880d681SAndroid Build Coastguard Worker; CHECK-NEXT: [[GLOB_NS_VAR]] EXTERNAL VARIABLE "ns::global_namespace_variable" 216*9880d681SAndroid Build Coastguard Worker; CHECK-NEXT: [[ANON_INNER]] EXTERNAL TYPE "(anonymous namespace)::inner" 217*9880d681SAndroid Build Coastguard Worker; CHECK-NEXT: [[D_VAR]] EXTERNAL VARIABLE "ns::d" 218*9880d681SAndroid Build Coastguard Worker; CHECK-NEXT: [[GLOB_NS_FUNC]] EXTERNAL FUNCTION "ns::global_namespace_function" 219*9880d681SAndroid Build Coastguard Worker; CHECK-NEXT: [[STATIC_MEM_VAR]] EXTERNAL VARIABLE "C::static_member_variable" 220*9880d681SAndroid Build Coastguard Worker; CHECK-NEXT: [[STATIC_MEM_FUNC]] EXTERNAL FUNCTION "C::static_member_function" 221*9880d681SAndroid Build Coastguard Worker 222*9880d681SAndroid Build Coastguard Worker 223*9880d681SAndroid Build Coastguard Worker 224*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: debug_gnu_pubtypes contents: 225*9880d681SAndroid Build Coastguard Worker; CHECK: Offset Linkage Kind Name 226*9880d681SAndroid Build Coastguard Worker; CHECK-DAG: [[C]] EXTERNAL TYPE "C" 227*9880d681SAndroid Build Coastguard Worker; CHECK-DAG: [[D]] EXTERNAL TYPE "ns::D" 228*9880d681SAndroid Build Coastguard Worker; CHECK-DAG: [[INT]] STATIC TYPE "int" 229*9880d681SAndroid Build Coastguard Worker 230*9880d681SAndroid Build Coastguard Worker%struct.C = type { i8 } 231*9880d681SAndroid Build Coastguard Worker%"struct.ns::D" = type { i32 } 232*9880d681SAndroid Build Coastguard Worker 233*9880d681SAndroid Build Coastguard Worker@_ZN1C22static_member_variableE = global i32 0, align 4 234*9880d681SAndroid Build Coastguard Worker@global_variable = global %struct.C zeroinitializer, align 1 235*9880d681SAndroid Build Coastguard Worker@_ZN2ns25global_namespace_variableE = global i32 1, align 4 236*9880d681SAndroid Build Coastguard Worker@_ZN2ns1dE = global %"struct.ns::D" zeroinitializer, align 4 237*9880d681SAndroid Build Coastguard Worker@_ZZ2f3vE1z = internal global i32 0, align 4 238*9880d681SAndroid Build Coastguard Worker@_ZN12_GLOBAL__N_11iE = internal global i32 0, align 4 239*9880d681SAndroid Build Coastguard Worker@_ZN12_GLOBAL__N_15inner1bE = internal global i32 0, align 4 240*9880d681SAndroid Build Coastguard Worker@_ZN5outer12_GLOBAL__N_11cE = internal global i32 0, align 4 241*9880d681SAndroid Build Coastguard Worker 242*9880d681SAndroid Build Coastguard Worker; Function Attrs: nounwind uwtable 243*9880d681SAndroid Build Coastguard Workerdefine void @_ZN1C15member_functionEv(%struct.C* %this) #0 align 2 !dbg !20 { 244*9880d681SAndroid Build Coastguard Workerentry: 245*9880d681SAndroid Build Coastguard Worker %this.addr = alloca %struct.C*, align 8 246*9880d681SAndroid Build Coastguard Worker store %struct.C* %this, %struct.C** %this.addr, align 8 247*9880d681SAndroid Build Coastguard Worker call void @llvm.dbg.declare(metadata %struct.C** %this.addr, metadata !51, metadata !53), !dbg !54 248*9880d681SAndroid Build Coastguard Worker %this1 = load %struct.C*, %struct.C** %this.addr 249*9880d681SAndroid Build Coastguard Worker store i32 0, i32* @_ZN1C22static_member_variableE, align 4, !dbg !55 250*9880d681SAndroid Build Coastguard Worker ret void, !dbg !56 251*9880d681SAndroid Build Coastguard Worker} 252*9880d681SAndroid Build Coastguard Worker 253*9880d681SAndroid Build Coastguard Worker; Function Attrs: nounwind readnone 254*9880d681SAndroid Build Coastguard Workerdeclare void @llvm.dbg.declare(metadata, metadata, metadata) #1 255*9880d681SAndroid Build Coastguard Worker 256*9880d681SAndroid Build Coastguard Worker; Function Attrs: nounwind uwtable 257*9880d681SAndroid Build Coastguard Workerdefine i32 @_ZN1C22static_member_functionEv() #0 align 2 !dbg !21 { 258*9880d681SAndroid Build Coastguard Workerentry: 259*9880d681SAndroid Build Coastguard Worker %0 = load i32, i32* @_ZN1C22static_member_variableE, align 4, !dbg !57 260*9880d681SAndroid Build Coastguard Worker ret i32 %0, !dbg !57 261*9880d681SAndroid Build Coastguard Worker} 262*9880d681SAndroid Build Coastguard Worker 263*9880d681SAndroid Build Coastguard Worker; Function Attrs: nounwind uwtable 264*9880d681SAndroid Build Coastguard Workerdefine i32 @_Z15global_functionv() #0 !dbg !22 { 265*9880d681SAndroid Build Coastguard Workerentry: 266*9880d681SAndroid Build Coastguard Worker ret i32 -1, !dbg !58 267*9880d681SAndroid Build Coastguard Worker} 268*9880d681SAndroid Build Coastguard Worker 269*9880d681SAndroid Build Coastguard Worker; Function Attrs: nounwind uwtable 270*9880d681SAndroid Build Coastguard Workerdefine void @_ZN2ns25global_namespace_functionEv() #0 !dbg !23 { 271*9880d681SAndroid Build Coastguard Workerentry: 272*9880d681SAndroid Build Coastguard Worker call void @_ZN1C15member_functionEv(%struct.C* @global_variable), !dbg !59 273*9880d681SAndroid Build Coastguard Worker ret void, !dbg !60 274*9880d681SAndroid Build Coastguard Worker} 275*9880d681SAndroid Build Coastguard Worker 276*9880d681SAndroid Build Coastguard Worker; Function Attrs: nounwind uwtable 277*9880d681SAndroid Build Coastguard Workerdefine i32* @_Z2f3v() #0 !dbg !26 { 278*9880d681SAndroid Build Coastguard Workerentry: 279*9880d681SAndroid Build Coastguard Worker ret i32* @_ZZ2f3vE1z, !dbg !61 280*9880d681SAndroid Build Coastguard Worker} 281*9880d681SAndroid Build Coastguard Worker 282*9880d681SAndroid Build Coastguard Worker; Function Attrs: nounwind uwtable 283*9880d681SAndroid Build Coastguard Workerdefine i32 @_Z2f7v() #0 !dbg !30 { 284*9880d681SAndroid Build Coastguard Workerentry: 285*9880d681SAndroid Build Coastguard Worker %0 = load i32, i32* @_ZN12_GLOBAL__N_11iE, align 4, !dbg !62 286*9880d681SAndroid Build Coastguard Worker %call = call i32* @_Z2f3v(), !dbg !62 287*9880d681SAndroid Build Coastguard Worker %1 = load i32, i32* %call, align 4, !dbg !62 288*9880d681SAndroid Build Coastguard Worker %add = add nsw i32 %0, %1, !dbg !62 289*9880d681SAndroid Build Coastguard Worker %2 = load i32, i32* @_ZN12_GLOBAL__N_15inner1bE, align 4, !dbg !62 290*9880d681SAndroid Build Coastguard Worker %add1 = add nsw i32 %add, %2, !dbg !62 291*9880d681SAndroid Build Coastguard Worker %3 = load i32, i32* @_ZN5outer12_GLOBAL__N_11cE, align 4, !dbg !62 292*9880d681SAndroid Build Coastguard Worker %add2 = add nsw i32 %add1, %3, !dbg !62 293*9880d681SAndroid Build Coastguard Worker ret i32 %add2, !dbg !62 294*9880d681SAndroid Build Coastguard Worker} 295*9880d681SAndroid Build Coastguard Worker 296*9880d681SAndroid Build Coastguard Workerattributes #0 = { nounwind uwtable "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "unsafe-fp-math"="false" "use-soft-float"="false" } 297*9880d681SAndroid Build Coastguard Workerattributes #1 = { nounwind readnone } 298*9880d681SAndroid Build Coastguard Worker 299*9880d681SAndroid Build Coastguard Worker!llvm.dbg.cu = !{!0} 300*9880d681SAndroid Build Coastguard Worker!llvm.module.flags = !{!48, !49} 301*9880d681SAndroid Build Coastguard Worker!llvm.ident = !{!50} 302*9880d681SAndroid Build Coastguard Worker 303*9880d681SAndroid Build Coastguard Worker!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "clang version 3.7.0 (trunk 234897) (llvm/trunk 234911)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, retainedTypes: !3, globals: !31, imports: !44) 304*9880d681SAndroid Build Coastguard Worker!1 = !DIFile(filename: "gnu-public-names.cpp", directory: "/tmp/dbginfo") 305*9880d681SAndroid Build Coastguard Worker!2 = !{} 306*9880d681SAndroid Build Coastguard Worker!3 = !{!4, !15} 307*9880d681SAndroid Build Coastguard Worker!4 = !DICompositeType(tag: DW_TAG_structure_type, name: "C", file: !1, line: 1, size: 8, align: 8, elements: !5, identifier: "_ZTS1C") 308*9880d681SAndroid Build Coastguard Worker!5 = !{!6, !8, !12} 309*9880d681SAndroid Build Coastguard Worker!6 = !DIDerivedType(tag: DW_TAG_member, name: "static_member_variable", scope: !4, file: !1, line: 4, baseType: !7, flags: DIFlagStaticMember) 310*9880d681SAndroid Build Coastguard Worker!7 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed) 311*9880d681SAndroid Build Coastguard Worker!8 = !DISubprogram(name: "member_function", linkageName: "_ZN1C15member_functionEv", scope: !4, file: !1, line: 2, type: !9, isLocal: false, isDefinition: false, scopeLine: 2, flags: DIFlagPrototyped, isOptimized: false) 312*9880d681SAndroid Build Coastguard Worker!9 = !DISubroutineType(types: !10) 313*9880d681SAndroid Build Coastguard Worker!10 = !{null, !11} 314*9880d681SAndroid Build Coastguard Worker!11 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !4, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer) 315*9880d681SAndroid Build Coastguard Worker!12 = !DISubprogram(name: "static_member_function", linkageName: "_ZN1C22static_member_functionEv", scope: !4, file: !1, line: 3, type: !13, isLocal: false, isDefinition: false, scopeLine: 3, flags: DIFlagPrototyped, isOptimized: false) 316*9880d681SAndroid Build Coastguard Worker!13 = !DISubroutineType(types: !14) 317*9880d681SAndroid Build Coastguard Worker!14 = !{!7} 318*9880d681SAndroid Build Coastguard Worker!15 = !DICompositeType(tag: DW_TAG_structure_type, name: "D", scope: !16, file: !1, line: 29, size: 32, align: 32, elements: !17, identifier: "_ZTSN2ns1DE") 319*9880d681SAndroid Build Coastguard Worker!16 = !DINamespace(name: "ns", scope: null, file: !1, line: 23) 320*9880d681SAndroid Build Coastguard Worker!17 = !{!18} 321*9880d681SAndroid Build Coastguard Worker!18 = !DIDerivedType(tag: DW_TAG_member, name: "A", scope: !15, file: !1, line: 30, baseType: !7, size: 32, align: 32) 322*9880d681SAndroid Build Coastguard Worker!20 = distinct !DISubprogram(name: "member_function", linkageName: "_ZN1C15member_functionEv", scope: !4, file: !1, line: 9, type: !9, isLocal: false, isDefinition: true, scopeLine: 9, flags: DIFlagPrototyped, isOptimized: false, unit: !0, declaration: !8, variables: !2) 323*9880d681SAndroid Build Coastguard Worker!21 = distinct !DISubprogram(name: "static_member_function", linkageName: "_ZN1C22static_member_functionEv", scope: !4, file: !1, line: 13, type: !13, isLocal: false, isDefinition: true, scopeLine: 13, flags: DIFlagPrototyped, isOptimized: false, unit: !0, declaration: !12, variables: !2) 324*9880d681SAndroid Build Coastguard Worker!22 = distinct !DISubprogram(name: "global_function", linkageName: "_Z15global_functionv", scope: !1, file: !1, line: 19, type: !13, isLocal: false, isDefinition: true, scopeLine: 19, flags: DIFlagPrototyped, isOptimized: false, unit: !0, variables: !2) 325*9880d681SAndroid Build Coastguard Worker!23 = distinct !DISubprogram(name: "global_namespace_function", linkageName: "_ZN2ns25global_namespace_functionEv", scope: !16, file: !1, line: 24, type: !24, isLocal: false, isDefinition: true, scopeLine: 24, flags: DIFlagPrototyped, isOptimized: false, unit: !0, variables: !2) 326*9880d681SAndroid Build Coastguard Worker!24 = !DISubroutineType(types: !25) 327*9880d681SAndroid Build Coastguard Worker!25 = !{null} 328*9880d681SAndroid Build Coastguard Worker!26 = distinct !DISubprogram(name: "f3", linkageName: "_Z2f3v", scope: !1, file: !1, line: 40, type: !27, isLocal: false, isDefinition: true, scopeLine: 40, flags: DIFlagPrototyped, isOptimized: false, unit: !0, variables: !2) 329*9880d681SAndroid Build Coastguard Worker!27 = !DISubroutineType(types: !28) 330*9880d681SAndroid Build Coastguard Worker!28 = !{!29} 331*9880d681SAndroid Build Coastguard Worker!29 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !7, size: 64, align: 64) 332*9880d681SAndroid Build Coastguard Worker!30 = distinct !DISubprogram(name: "f7", linkageName: "_Z2f7v", scope: !1, file: !1, line: 57, type: !13, isLocal: false, isDefinition: true, scopeLine: 57, flags: DIFlagPrototyped, isOptimized: false, unit: !0, variables: !2) 333*9880d681SAndroid Build Coastguard Worker!31 = !{!32, !33, !34, !35, !36, !37, !39, !41} 334*9880d681SAndroid Build Coastguard Worker!32 = !DIGlobalVariable(name: "static_member_variable", linkageName: "_ZN1C22static_member_variableE", scope: !0, file: !1, line: 7, type: !7, isLocal: false, isDefinition: true, variable: i32* @_ZN1C22static_member_variableE, declaration: !6) 335*9880d681SAndroid Build Coastguard Worker!33 = !DIGlobalVariable(name: "global_variable", scope: !0, file: !1, line: 17, type: !4, isLocal: false, isDefinition: true, variable: %struct.C* @global_variable) 336*9880d681SAndroid Build Coastguard Worker!34 = !DIGlobalVariable(name: "global_namespace_variable", linkageName: "_ZN2ns25global_namespace_variableE", scope: !16, file: !1, line: 27, type: !7, isLocal: false, isDefinition: true, variable: i32* @_ZN2ns25global_namespace_variableE) 337*9880d681SAndroid Build Coastguard Worker!35 = !DIGlobalVariable(name: "d", linkageName: "_ZN2ns1dE", scope: !16, file: !1, line: 31, type: !15, isLocal: false, isDefinition: true, variable: %"struct.ns::D"* @_ZN2ns1dE) 338*9880d681SAndroid Build Coastguard Worker!36 = !DIGlobalVariable(name: "z", scope: !26, file: !1, line: 41, type: !7, isLocal: true, isDefinition: true, variable: i32* @_ZZ2f3vE1z) 339*9880d681SAndroid Build Coastguard Worker!37 = !DIGlobalVariable(name: "i", linkageName: "_ZN12_GLOBAL__N_11iE", scope: !38, file: !1, line: 37, type: !7, isLocal: true, isDefinition: true, variable: i32* @_ZN12_GLOBAL__N_11iE) 340*9880d681SAndroid Build Coastguard Worker!38 = !DINamespace(scope: null, file: !1, line: 36) 341*9880d681SAndroid Build Coastguard Worker!39 = !DIGlobalVariable(name: "b", linkageName: "_ZN12_GLOBAL__N_15inner1bE", scope: !40, file: !1, line: 47, type: !7, isLocal: true, isDefinition: true, variable: i32* @_ZN12_GLOBAL__N_15inner1bE) 342*9880d681SAndroid Build Coastguard Worker!40 = !DINamespace(name: "inner", scope: !38, file: !1, line: 46) 343*9880d681SAndroid Build Coastguard Worker!41 = !DIGlobalVariable(name: "c", linkageName: "_ZN5outer12_GLOBAL__N_11cE", scope: !42, file: !1, line: 53, type: !7, isLocal: true, isDefinition: true, variable: i32* @_ZN5outer12_GLOBAL__N_11cE) 344*9880d681SAndroid Build Coastguard Worker!42 = !DINamespace(scope: !43, file: !1, line: 52) 345*9880d681SAndroid Build Coastguard Worker!43 = !DINamespace(name: "outer", scope: null, file: !1, line: 51) 346*9880d681SAndroid Build Coastguard Worker!44 = !{!45, !47} 347*9880d681SAndroid Build Coastguard Worker!45 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !0, entity: !46, line: 34) 348*9880d681SAndroid Build Coastguard Worker!46 = !DIGlobalVariable(name: "global_namespace_variable_decl", linkageName: "_ZN2ns30global_namespace_variable_declE", scope: !16, file: !1, line: 28, type: !7, isLocal: false, isDefinition: false) 349*9880d681SAndroid Build Coastguard Worker!47 = !DIImportedEntity(tag: DW_TAG_imported_module, scope: !43, entity: !42, line: 43) 350*9880d681SAndroid Build Coastguard Worker!48 = !{i32 2, !"Dwarf Version", i32 4} 351*9880d681SAndroid Build Coastguard Worker!49 = !{i32 2, !"Debug Info Version", i32 3} 352*9880d681SAndroid Build Coastguard Worker!50 = !{!"clang version 3.7.0 (trunk 234897) (llvm/trunk 234911)"} 353*9880d681SAndroid Build Coastguard Worker!51 = !DILocalVariable(name: "this", arg: 1, scope: !20, type: !52, flags: DIFlagArtificial | DIFlagObjectPointer) 354*9880d681SAndroid Build Coastguard Worker!52 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !4, size: 64, align: 64) 355*9880d681SAndroid Build Coastguard Worker!53 = !DIExpression() 356*9880d681SAndroid Build Coastguard Worker!54 = !DILocation(line: 0, scope: !20) 357*9880d681SAndroid Build Coastguard Worker!55 = !DILocation(line: 10, scope: !20) 358*9880d681SAndroid Build Coastguard Worker!56 = !DILocation(line: 11, scope: !20) 359*9880d681SAndroid Build Coastguard Worker!57 = !DILocation(line: 14, scope: !21) 360*9880d681SAndroid Build Coastguard Worker!58 = !DILocation(line: 20, scope: !22) 361*9880d681SAndroid Build Coastguard Worker!59 = !DILocation(line: 25, scope: !23) 362*9880d681SAndroid Build Coastguard Worker!60 = !DILocation(line: 26, scope: !23) 363*9880d681SAndroid Build Coastguard Worker!61 = !DILocation(line: 42, scope: !26) 364*9880d681SAndroid Build Coastguard Worker!62 = !DILocation(line: 58, scope: !30) 365