diff --git a/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp --- a/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp @@ -3111,7 +3111,9 @@ OS.EmitCOFFSectionIndex(GVSym); OS.AddComment("Name"); const unsigned LengthOfDataRecord = 12; - emitNullTerminatedSymbolName(OS, DIGV->getName(), LengthOfDataRecord); + const DIScope *Scope = DIGV->getScope(); + emitNullTerminatedSymbolName( + OS, getFullyQualifiedName(Scope, DIGV->getName()), LengthOfDataRecord); endSymbolRecord(DataEnd); } else { // FIXME: Currently this only emits the global variables in the IR metadata. diff --git a/llvm/test/DebugInfo/COFF/globals.ll b/llvm/test/DebugInfo/COFF/globals.ll --- a/llvm/test/DebugInfo/COFF/globals.ll +++ b/llvm/test/DebugInfo/COFF/globals.ll @@ -4,111 +4,129 @@ ; RUN: llc < %s -filetype=obj | obj2yaml | FileCheck %s --check-prefix=YAML ; C++ source to regenerate: -; $ cat t.cpp +; $ cat a.cpp ; int first; ; template struct A { static const int comdat = 3; }; -; const int *middle = &A::comdat; +; thread_local const int *middle = &A::comdat; +; namespace foo { +; thread_local int globalTLS = 4; +; int justGlobal = 5; +; static int globalStatic = 6; +; } ; int last; -; $ clang t.cpp -S -emit-llvm -g -gcodeview -o t.ll +; int bar() { return foo::globalStatic + foo::globalTLS; } +; $ clang-cl a.cpp /c /Z7 /GS- /clang:-S clang:-emit-llvm ; ASM: .section .debug$S,"dr" -; ASM: .p2align 2 -; ASM: .long 4 # Debug section magic +; ASM-NEXT: .p2align 2 +; ASM-NEXT: .long 4 # Debug section magic -; ASM: .short {{.*-.*}} # Record length -; ASM: .short 4364 # Record kind: S_LDATA32 -; ASM: .long 116 # Type -; ASM: .secrel32 "?first@@3HA" # DataOffset -; ASM: .secidx "?first@@3HA" # Segment -; ASM: .asciz "first" # Name +; ASM: .short 4365 # Record kind: S_GDATA32 +; ASM-NEXT: .long 116 # Type +; ASM-NEXT: .secrel32 "?first@@3HA" # DataOffset +; ASM-NEXT: .secidx "?first@@3HA" # Segment +; ASM-NEXT: .asciz "first" # Name +; ASM-NEXT: .p2align 2 + +; ASM: .short 4371 # Record kind: S_GTHREAD32 +; ASM-NEXT: .long 4100 # Type +; ASM-NEXT: .secrel32 "?middle@@3PEBHEB" # DataOffset +; ASM-NEXT: .secidx "?middle@@3PEBHEB" # Segment +; ASM-NEXT: .asciz "middle" # Name +; ASM-NEXT: .p2align 2 -; ASM: .short {{.*-.*}} # Record length ; ASM: .short 4371 # Record kind: S_GTHREAD32 -; ASM: .long 4097 # Type -; ASM: .secrel32 "?middle@@3PEBHEB" # DataOffset -; ASM: .secidx "?middle@@3PEBHEB" # Segment -; ASM: .asciz "middle" # Name +; ASM-NEXT: .long 116 # Type +; ASM-NEXT: .secrel32 "?globalTLS@foo@@3HA" # DataOffset +; ASM-NEXT: .secidx "?globalTLS@foo@@3HA" # Segment +; ASM-NEXT: .asciz "globalTLS" # Name +; ASM-NEXT: .p2align 2 + +; ASM: .short 4365 # Record kind: S_GDATA32 +; ASM-NEXT: .long 116 # Type +; ASM-NEXT: .secrel32 "?justGlobal@foo@@3HA" # DataOffset +; ASM-NEXT: .secidx "?justGlobal@foo@@3HA" # Segment +; ASM-NEXT: .asciz "justGlobal" # Name +; ASM-NEXT: .p2align 2 -; ASM: .short {{.*-.*}} # Record length ; ASM: .short 4365 # Record kind: S_GDATA32 -; ASM: .long 116 # Type -; ASM: .secrel32 "?last@@3HA" # DataOffset -; ASM: .secidx "?last@@3HA" # Segment -; ASM: .asciz "last" # Name +; ASM-NEXT: .long 116 # Type +; ASM-NEXT: .secrel32 "?last@@3HA" # DataOffset +; ASM-NEXT: .secidx "?last@@3HA" # Segment +; ASM-NEXT: .asciz "last" # Name +; ASM-NEXT: .p2align 2 + +; ASM: .short 4364 # Record kind: S_LDATA32 +; ASM-NEXT: .long 116 # Type +; ASM-NEXT: .secrel32 "?globalStatic@foo@@3HA" # DataOffset +; ASM-NEXT: .secidx "?globalStatic@foo@@3HA" # Segment +; ASM-NEXT: .asciz "globalStatic" # Name +; ASM-NEXT: .p2align 2 ; ASM: .section .debug$S,"dr",associative,"?comdat@?$A@X@@2HB" -; ASM: .p2align 2 -; ASM: .long 4 # Debug section magic +; ASM-NEXT: .p2align 2 +; ASM-NEXT: .long 4 # Debug section magic -; ASM: .short {{.*-.*}} # Record length ; ASM: .short 4365 # Record kind: S_GDATA32 -; ASM: .long 4096 # Type -; ASM: .secrel32 "?comdat@?$A@X@@2HB" # DataOffset -; ASM: .secidx "?comdat@?$A@X@@2HB" # Segment -; ASM: .asciz "comdat" # Name - -; OBJ: CodeViewTypes [ -; OBJ: Section: .debug$T -; OBJ: Magic: 0x4 -; OBJ: Modifier (0x1000) { -; OBJ: TypeLeafKind: LF_MODIFIER (0x1001) -; OBJ: ModifiedType: int (0x74) -; OBJ: Modifiers [ (0x1) -; OBJ: Const (0x1) -; OBJ: ] -; OBJ: } -; OBJ: Pointer (0x1001) { -; OBJ: TypeLeafKind: LF_POINTER (0x1002) -; OBJ: PointeeType: const int (0x1000) -; OBJ: PtrType: Near64 (0xC) -; OBJ: PtrMode: Pointer (0x0) -; OBJ: IsFlat: 0 -; OBJ: IsConst: 0 -; OBJ: IsVolatile: 0 -; OBJ: IsUnaligned: 0 -; OBJ: } -; OBJ: ] +; ASM-NEXT: .long 4099 # Type +; ASM-NEXT: .secrel32 "?comdat@?$A@X@@2HB" # DataOffset +; ASM-NEXT: .secidx "?comdat@?$A@X@@2HB" # Segment +; ASM-NEXT: .asciz "comdat" # Name ; OBJ: CodeViewDebugInfo [ ; OBJ: Section: .debug$S ; OBJ: Magic: 0x4 ; OBJ: Subsection [ -; OBJ: SubSectionType: Symbols (0xF1) -; OBJ: DataSym { -; OBJ: Kind: S_LDATA32 (0x110C) -; OBJ: DataOffset: ?first@@3HA+0x0 -; OBJ: Type: int (0x74) -; OBJ: DisplayName: first -; OBJ: LinkageName: ?first@@3HA -; OBJ: } -; OBJ: GlobalTLS { -; OBJ: DataOffset: ?middle@@3PEBHEB+0x0 -; OBJ: Type: const int* (0x1001) -; OBJ: DisplayName: middle -; OBJ: LinkageName: ?middle@@3PEBHEB -; OBJ: } -; OBJ: GlobalData { -; OBJ: Kind: S_GDATA32 (0x110D) -; OBJ: DataOffset: ?last@@3HA+0x0 -; OBJ: Type: int (0x74) -; OBJ: DisplayName: last -; OBJ: LinkageName: ?last@@3HA -; OBJ: } -; OBJ: ] -; OBJ: ] -; OBJ: CodeViewDebugInfo [ -; OBJ: Section: .debug$S -; OBJ: Magic: 0x4 -; OBJ: Subsection [ -; OBJ: SubSectionType: Symbols (0xF1) -; OBJ: GlobalData { -; OBJ: DataOffset: ?comdat@?$A@X@@2HB+0x0 -; OBJ: Type: const int (0x1000) -; OBJ: DisplayName: comdat -; OBJ: LinkageName: ?comdat@?$A@X@@2HB -; OBJ: } -; OBJ: ] -; OBJ: ] + +; OBJ-LABEL: GlobalData { +; OBJ-NEXT: Kind: S_GDATA32 (0x110D) +; OBJ-NEXT: DataOffset: ?first@@3HA+0x0 +; OBJ-NEXT: Type: int (0x74) +; OBJ-NEXT: DisplayName: first +; OBJ-NEXT: LinkageName: ?first@@3HA +; OBJ-NEXT: } +; OBJ-NEXT: GlobalTLS { +; OBJ-NEXT: Kind: S_GTHREAD32 (0x1113) +; OBJ-NEXT: DataOffset: ?middle@@3PEBHEB+0x0 +; OBJ-NEXT: Type: const int* (0x1004) +; OBJ-NEXT: DisplayName: middle +; OBJ-NEXT: LinkageName: ?middle@@3PEBHEB +; OBJ-NEXT: } +; OBJ-NEXT: GlobalTLS { +; OBJ-NEXT: Kind: S_GTHREAD32 (0x1113) +; OBJ-NEXT: DataOffset: ?globalTLS@foo@@3HA+0x0 +; OBJ-NEXT: Type: int (0x74) +; OBJ-NEXT: DisplayName: globalTLS +; OBJ-NEXT: LinkageName: ?globalTLS@foo@@3HA +; OBJ-NEXT: } +; OBJ-NEXT: GlobalData { +; OBJ-NEXT: Kind: S_GDATA32 (0x110D) +; OBJ-NEXT: DataOffset: ?justGlobal@foo@@3HA+0x0 +; OBJ-NEXT: Type: int (0x74) +; OBJ-NEXT: DisplayName: justGlobal +; OBJ-NEXT: LinkageName: ?justGlobal@foo@@3HA +; OBJ-NEXT: } +; OBJ-NEXT: GlobalData { +; OBJ-NEXT: Kind: S_GDATA32 (0x110D) +; OBJ-NEXT: DataOffset: ?last@@3HA+0x0 +; OBJ-NEXT: Type: int (0x74) +; OBJ-NEXT: DisplayName: last +; OBJ-NEXT: LinkageName: ?last@@3HA +; OBJ-NEXT: } +; OBJ-NEXT: DataSym { +; OBJ-NEXT: Kind: S_LDATA32 (0x110C) +; OBJ-NEXT: DataOffset: ?globalStatic@foo@@3HA+0x0 +; OBJ-NEXT: Type: int (0x74) +; OBJ-NEXT: DisplayName: globalStatic +; OBJ-NEXT: LinkageName: ?globalStatic@foo@@3HA +; OBJ-NEXT: } + +; OBJ: GlobalData { +; OBJ-NEXT: Kind: S_GDATA32 (0x110D) +; OBJ-LABEL: DataOffset: ?comdat@?$A@X@@2HB+0x0 +; OBJ-NEXT: Type: const int (0x1003) +; OBJ-NEXT: DisplayName: comdat +; OBJ-NEXT: LinkageName: ?comdat@?$A@X@@2HB ; YAML-LABEL: - Name: '.debug$S' ; YAML: Subsections: @@ -116,75 +134,158 @@ ; YAML: Records: ; YAML: - Kind: S_COMPILE3 ; YAML: Compile3Sym: + ; YAML: - !Symbols -; YAML: Records: -; YAML: - Kind: S_LDATA32 -; YAML: DataSym: +; YAML-NEXT: Records: +; YAML-LABEL: - Kind: S_GDATA32 +; YAML-NEXT: DataSym: ; YAML-NOT: Segment -; YAML: Type: 116 +; YAML-NEXT: Type: 116 ; YAML-NOT: Segment -; YAML: DisplayName: first +; YAML-NEXT: DisplayName: first ; YAML-NOT: Segment -; YAML: - Kind: S_GTHREAD32 -; YAML: ThreadLocalDataSym: -; YAML: Type: 4097 -; YAML: DisplayName: middle -; YAML: - Kind: S_GDATA32 -; YAML: DataSym: +; YAML-NEXT: - Kind: S_GTHREAD32 +; YAML-NEXT: ThreadLocalDataSym: +; YAML-NEXT: Type: 4100 +; YAML-NEXT: DisplayName: middle +; YAML-NEXT: - Kind: S_GTHREAD32 +; YAML-NEXT: ThreadLocalDataSym: +; YAML-NEXT: Type: 116 +; YAML-NEXT: DisplayName: globalTLS +; YAML-NEXT: - Kind: S_GDATA32 +; YAML-NEXT: DataSym: ; YAML-NOT: Segment -; YAML: Type: 116 -; YAML-NOT: Offset +; YAML-NEXT: Type: 116 ; YAML-NOT: Segment -; YAML: DisplayName: last +; YAML-NEXT: DisplayName: justGlobal ; YAML-NOT: Segment - +; YAML-NEXT: - Kind: S_GDATA32 +; YAML-NEXT: DataSym: +; YAML-NEXT: Type: 116 +; YAML-NEXT: DisplayName: last +; YAML-NEXT: - Kind: S_LDATA32 +; YAML-NEXT: DataSym: +; YAML-NEXT: Type: 116 +; YAML-NEXT: DisplayName: globalStatic + ; The missing offsets are represented as relocations against this section. ; YAML: Relocations: -; YAML: - VirtualAddress: 92 -; YAML: SymbolName: '?first@@3HA' -; YAML: Type: IMAGE_REL_AMD64_SECREL -; YAML: - VirtualAddress: 96 -; YAML: SymbolName: '?first@@3HA' -; YAML: Type: IMAGE_REL_AMD64_SECTION +; YAML-NEXT: - VirtualAddress: 184 +; YAML-NEXT: SymbolName: '?bar@@YAHXZ' +; YAML-NEXT: Type: IMAGE_REL_AMD64_SECREL +; YAML-NEXT: - VirtualAddress: 188 +; YAML-NEXT: SymbolName: '?bar@@YAHXZ' +; YAML-NEXT: Type: IMAGE_REL_AMD64_SECTION +; YAML-NEXT: - VirtualAddress: 240 +; YAML-NEXT: SymbolName: '?bar@@YAHXZ' +; YAML-NEXT: Type: IMAGE_REL_AMD64_SECREL +; YAML-NEXT: - VirtualAddress: 244 +; YAML-NEXT: SymbolName: '?bar@@YAHXZ' +; YAML-NEXT: Type: IMAGE_REL_AMD64_SECTION +; YAML-NEXT: - VirtualAddress: 288 +; YAML-NEXT: SymbolName: '?first@@3HA' +; YAML-NEXT: Type: IMAGE_REL_AMD64_SECREL +; YAML-NEXT: - VirtualAddress: 292 +; YAML-NEXT: SymbolName: '?first@@3HA' +; YAML-NEXT: Type: IMAGE_REL_AMD64_SECTION +; YAML-NEXT: - VirtualAddress: 308 +; YAML-NEXT: SymbolName: '?middle@@3PEBHEB' +; YAML-NEXT: Type: IMAGE_REL_AMD64_SECREL +; YAML-NEXT: - VirtualAddress: 312 +; YAML-NEXT: SymbolName: '?middle@@3PEBHEB' +; YAML-NEXT: Type: IMAGE_REL_AMD64_SECTION +; YAML-NEXT: - VirtualAddress: 332 +; YAML-NEXT: SymbolName: '?globalTLS@foo@@3HA' +; YAML-NEXT: Type: IMAGE_REL_AMD64_SECREL +; YAML-NEXT: - VirtualAddress: 336 +; YAML-NEXT: SymbolName: '?globalTLS@foo@@3HA' +; YAML-NEXT: Type: IMAGE_REL_AMD64_SECTION +; YAML-NEXT: - VirtualAddress: 356 +; YAML-NEXT: SymbolName: '?justGlobal@foo@@3HA' +; YAML-NEXT: Type: IMAGE_REL_AMD64_SECREL +; YAML-NEXT: - VirtualAddress: 360 +; YAML-NEXT: SymbolName: '?justGlobal@foo@@3HA' +; YAML-NEXT: Type: IMAGE_REL_AMD64_SECTION +; YAML-NEXT: - VirtualAddress: 384 +; YAML-NEXT: SymbolName: '?last@@3HA' +; YAML-NEXT: Type: IMAGE_REL_AMD64_SECREL +; YAML-NEXT: - VirtualAddress: 388 +; YAML-NEXT: SymbolName: '?last@@3HA' +; YAML-NEXT: Type: IMAGE_REL_AMD64_SECTION +; YAML-NEXT: - VirtualAddress: 404 +; YAML-NEXT: SymbolName: '?globalStatic@foo@@3HA' +; YAML-NEXT: Type: IMAGE_REL_AMD64_SECREL +; YAML-NEXT: - VirtualAddress: 408 +; YAML-NEXT: SymbolName: '?globalStatic@foo@@3HA' +; YAML-NEXT: Type: IMAGE_REL_AMD64_SECTION + + +; ModuleID = 'a.cpp' +source_filename = "a.cpp" +target datalayout = "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" +target triple = "x86_64-pc-windows-msvc19.25.28614" -; ModuleID = 't.cpp' -source_filename = "t.cpp" -target datalayout = "e-m:w-i64:64-f80:128-n8:16:32:64-S128" -target triple = "x86_64-pc-windows-msvc19.0.23918" +$"?comdat@?$A@X@@2HB" = comdat any -$"\01?comdat@?$A@X@@2HB" = comdat any +@"?first@@3HA" = dso_local global i32 0, align 4, !dbg !0 +@"?comdat@?$A@X@@2HB" = linkonce_odr dso_local constant i32 3, comdat, align 4, !dbg !6 +@"?middle@@3PEBHEB" = dso_local thread_local global i32* @"?comdat@?$A@X@@2HB", align 8, !dbg !15 +@"?globalTLS@foo@@3HA" = dso_local thread_local global i32 4, align 4, !dbg !18 +@"?justGlobal@foo@@3HA" = dso_local global i32 5, align 4, !dbg !21 +@"?last@@3HA" = dso_local global i32 0, align 4, !dbg !23 +@"?globalStatic@foo@@3HA" = internal global i32 6, align 4, !dbg !25 -@"\01?first@@3HA" = internal global i32 0, align 4, !dbg !0 -@"\01?comdat@?$A@X@@2HB" = linkonce_odr constant i32 3, comdat, align 4, !dbg !6 -@"\01?middle@@3PEBHEB" = thread_local global i32* @"\01?comdat@?$A@X@@2HB", align 8, !dbg !15 -@"\01?last@@3HA" = global i32 0, align 4, !dbg !18 +; Function Attrs: noinline nounwind optnone uwtable +define dso_local i32 @"?bar@@YAHXZ"() #0 !dbg !34 { +entry: + %0 = load i32, i32* @"?globalStatic@foo@@3HA", align 4, !dbg !37 + %1 = load i32, i32* @"?globalTLS@foo@@3HA", align 4, !dbg !37 + %add = add nsw i32 %0, %1, !dbg !37 + ret i32 %add, !dbg !37 +} + +attributes #0 = { noinline nounwind optnone uwtable "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="none" "less-precise-fpmad"="false" "min-legal-vector-width"="0" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "unsafe-fp-math"="false" "use-soft-float"="false" } !llvm.dbg.cu = !{!2} -!llvm.module.flags = !{!20, !21, !22} -!llvm.ident = !{!23} +!llvm.linker.options = !{!27, !28} +!llvm.module.flags = !{!29, !30, !31, !32} +!llvm.ident = !{!33} -!0 = distinct !DIGlobalVariableExpression(var: !1, expr: !DIExpression()) -!1 = !DIGlobalVariable(name: "first", linkageName: "\01?first@@3HA", scope: !2, file: !3, line: 1, type: !9, isLocal: true, isDefinition: true) -!2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "clang version 3.9.0 (trunk 271937)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !4, globals: !5) -!3 = !DIFile(filename: "t.cpp", directory: "D:\5Csrc\5Cllvm\5Cbuild") +!0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression()) +!1 = distinct !DIGlobalVariable(name: "first", linkageName: "?first@@3HA", scope: !2, file: !3, line: 1, type: !9, isLocal: false, isDefinition: true) +!2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus_14, file: !3, producer: "clang version 11.0.0 (https://github.com/llvm/llvm-project.git f5b1301ce8575f6d82e87031a1a5485c33637a93)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !4, globals: !5, nameTableKind: None) +!3 = !DIFile(filename: "a.cpp", directory: "F:\\llvm-project\\__test", checksumkind: CSK_MD5, checksum: "174b3f8c0b57f6e1b30354888009bbd6") !4 = !{} -!5 = !{!0, !6, !15, !18} -!6 = distinct !DIGlobalVariableExpression(var: !7, expr: !DIExpression()) -!7 = !DIGlobalVariable(name: "comdat", linkageName: "\01?comdat@?$A@X@@2HB", scope: !2, file: !3, line: 2, type: !8, isLocal: false, isDefinition: true, declaration: !10) +!5 = !{!0, !6, !15, !18, !21, !23, !25} +!6 = !DIGlobalVariableExpression(var: !7, expr: !DIExpression()) +!7 = distinct !DIGlobalVariable(name: "comdat", linkageName: "?comdat@?$A@X@@2HB", scope: !2, file: !3, line: 2, type: !8, isLocal: false, isDefinition: true, declaration: !10) !8 = !DIDerivedType(tag: DW_TAG_const_type, baseType: !9) -!9 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed) +!9 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) !10 = !DIDerivedType(tag: DW_TAG_member, name: "comdat", scope: !11, file: !3, line: 2, baseType: !8, flags: DIFlagStaticMember, extraData: i32 3) -!11 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "A", file: !3, line: 2, size: 8, align: 8, elements: !12, templateParams: !13) +!11 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "A", file: !3, line: 2, size: 8, flags: DIFlagTypePassByValue, elements: !12, templateParams: !13, identifier: ".?AU?$A@X@@") !12 = !{!10} !13 = !{!14} !14 = !DITemplateTypeParameter(name: "T", type: null) -!15 = distinct !DIGlobalVariableExpression(var: !16, expr: !DIExpression()) -!16 = !DIGlobalVariable(name: "middle", linkageName: "\01?middle@@3PEBHEB", scope: !2, file: !3, line: 3, type: !17, isLocal: false, isDefinition: true) -!17 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !8, size: 64, align: 64) -!18 = distinct !DIGlobalVariableExpression(var: !19, expr: !DIExpression()) -!19 = !DIGlobalVariable(name: "last", linkageName: "\01?last@@3HA", scope: !2, file: !3, line: 4, type: !9, isLocal: false, isDefinition: true) -!20 = !{i32 2, !"CodeView", i32 1} -!21 = !{i32 2, !"Debug Info Version", i32 3} -!22 = !{i32 1, !"PIC Level", i32 2} -!23 = !{!"clang version 3.9.0 (trunk 271937)"} - +!15 = !DIGlobalVariableExpression(var: !16, expr: !DIExpression()) +!16 = distinct !DIGlobalVariable(name: "middle", linkageName: "?middle@@3PEBHEB", scope: !2, file: !3, line: 3, type: !17, isLocal: false, isDefinition: true) +!17 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !8, size: 64) +!18 = !DIGlobalVariableExpression(var: !19, expr: !DIExpression()) +!19 = distinct !DIGlobalVariable(name: "globalTLS", linkageName: "?globalTLS@foo@@3HA", scope: !20, file: !3, line: 5, type: !9, isLocal: false, isDefinition: true) +!20 = !DINamespace(name: "foo", scope: null) +!21 = !DIGlobalVariableExpression(var: !22, expr: !DIExpression()) +!22 = distinct !DIGlobalVariable(name: "justGlobal", linkageName: "?justGlobal@foo@@3HA", scope: !20, file: !3, line: 6, type: !9, isLocal: false, isDefinition: true) +!23 = !DIGlobalVariableExpression(var: !24, expr: !DIExpression()) +!24 = distinct !DIGlobalVariable(name: "last", linkageName: "?last@@3HA", scope: !2, file: !3, line: 9, type: !9, isLocal: false, isDefinition: true) +!25 = !DIGlobalVariableExpression(var: !26, expr: !DIExpression()) +!26 = distinct !DIGlobalVariable(name: "globalStatic", linkageName: "?globalStatic@foo@@3HA", scope: !20, file: !3, line: 7, type: !9, isLocal: true, isDefinition: true) +!27 = !{!"/DEFAULTLIB:libcmt.lib"} +!28 = !{!"/DEFAULTLIB:oldnames.lib"} +!29 = !{i32 2, !"CodeView", i32 1} +!30 = !{i32 2, !"Debug Info Version", i32 3} +!31 = !{i32 1, !"wchar_size", i32 2} +!32 = !{i32 7, !"PIC Level", i32 2} +!33 = !{!"clang version 11.0.0 (https://github.com/llvm/llvm-project.git f5b1301ce8575f6d82e87031a1a5485c33637a93)"} +!34 = distinct !DISubprogram(name: "bar", linkageName: "?bar@@YAHXZ", scope: !3, file: !3, line: 10, type: !35, scopeLine: 10, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !4) +!35 = !DISubroutineType(types: !36) +!36 = !{!9} +!37 = !DILocation(line: 10, scope: !34)