Expand Up
@@ -4,7 +4,7 @@
; We should emit two array types: one used to describe the static data member,
; and the other used by the S_GDATA32 for the definition.
; C++ source:
; // Build with: clang-cl a.cpp /c /Z7 /clang:-S /clang:-emit-llvm
; struct Foo {
; static const char str[];
; };
Expand Down
Expand Up
@@ -41,33 +41,34 @@
; CHECK-NEXT: Kind: S_GDATA32 (0x110D)
; CHECK-NEXT: DataOffset: ?str@Foo@@2QBDB+0x0
; CHECK-NEXT: Type: [[ARRAY_COMPLETE]]
; CHECK-NEXT: DisplayName: str
; CHECK-NEXT: DisplayName: Foo:: str
; CHECK-NEXT: LinkageName: ?str@Foo@@2QBDB
; CHECK-NEXT: }
; 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.24215 "
; 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 "
%struct.Foo = type { i8 }
@"\01 ?str@Foo@@2QBDB" = constant [5 x i8 ] c "asdf\00 " , align 1 , !dbg !0
@"\01 ?f@@3UFoo@@A" = global %struct.Foo zeroinitializer , align 1 , !dbg !6
@"?str@Foo@@2QBDB" = dso_local constant [5 x i8 ] c "asdf\00 " , align 1 , !dbg !0
@"?f@@3UFoo@@A" = dso_local global %struct.Foo zeroinitializer , align 1 , !dbg !6
!llvm.dbg.cu = !{!2 }
!llvm.module.flags = !{!19 , !20 , !21 , !22 }
!llvm.ident = !{!23 }
!llvm.linker.options = !{!19 , !20 }
!llvm.module.flags = !{!21 , !22 , !23 , !24 }
!llvm.ident = !{!25 }
!0 = !DIGlobalVariableExpression (var: !1 , expr: !DIExpression ())
!1 = distinct !DIGlobalVariable (name: "str" , linkageName: "\01 ?str@Foo@@2QBDB" , scope: !2 , file: !3 , line: 4 , type: !16 , isLocal: false , isDefinition: true , declaration: !10 )
!2 = distinct !DICompileUnit (language: DW_LANG_C_plus_plus , file: !3 , producer: "clang version 6 .0.0 " , isOptimized: false , runtimeVersion: 0 , emissionKind: FullDebug, enums: !4 , globals: !5 )
!3 = !DIFile (filename: "t .cpp" , directory: "C: \5C src \5C llvm -project\5C build " , checksumkind: CSK_MD5, checksum: "15aa843c5a80301928caf03e71f87a54 " )
!1 = distinct !DIGlobalVariable (name: "str" , linkageName: "?str@Foo@@2QBDB" , scope: !2 , file: !3 , line: 4 , type: !16 , isLocal: false , isDefinition: true , declaration: !10 )
!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 202f144bffd0be254a829924195e1b8ebabcbb79) " , isOptimized: false , runtimeVersion: 0 , emissionKind: FullDebug, enums: !4 , globals: !5 , nameTableKind: None )
!3 = !DIFile (filename: "a .cpp" , directory: "F: \\l lvm -project\\_ _test " , checksumkind: CSK_MD5, checksum: "c2b2d28fd8aaa040c4141cea420d0648 " )
!4 = !{}
!5 = !{!0 , !6 }
!6 = !DIGlobalVariableExpression (var: !7 , expr: !DIExpression ())
!7 = distinct !DIGlobalVariable (name: "f" , linkageName: "\01 ?f@@3UFoo@@A" , scope: !2 , file: !3 , line: 5 , type: !8 , isLocal: false , isDefinition: true )
!8 = distinct !DICompositeType (tag: DW_TAG_structure_type, name: "Foo" , file: !3 , line: 1 , size: 8 , elements: !9 , identifier: ".?AUFoo@@" )
!7 = distinct !DIGlobalVariable (name: "f" , linkageName: "?f@@3UFoo@@A" , scope: !2 , file: !3 , line: 5 , type: !8 , isLocal: false , isDefinition: true )
!8 = distinct !DICompositeType (tag: DW_TAG_structure_type, name: "Foo" , file: !3 , line: 1 , size: 8 , flags: DIFlagTypePassByValue, elements: !9 , identifier: ".?AUFoo@@" )
!9 = !{!10 }
!10 = !DIDerivedType (tag: DW_TAG_member, name: "str" , scope: !8 , file: !3 , line: 2 , baseType: !11 , flags: DIFlagStaticMember)
!11 = !DICompositeType (tag: DW_TAG_array_type, baseType: !12 , elements: !14 )
Expand All
@@ -78,8 +79,10 @@ target triple = "x86_64-pc-windows-msvc19.0.24215"
!16 = !DICompositeType (tag: DW_TAG_array_type, baseType: !12 , size: 40 , elements: !17 )
!17 = !{!18 }
!18 = !DISubrange (count: 5 )
!19 = !{i32 2 , !"CodeView" , i32 1 }
!20 = !{i32 2 , !"Debug Info Version" , i32 3 }
!21 = !{i32 1 , !"wchar_size" , i32 2 }
!22 = !{i32 7 , !"PIC Level" , i32 2 }
!23 = !{!"clang version 6.0.0 " }
!19 = !{!"/DEFAULTLIB:libcmt.lib" }
!20 = !{!"/DEFAULTLIB:oldnames.lib" }
!21 = !{i32 2 , !"CodeView" , i32 1 }
!22 = !{i32 2 , !"Debug Info Version" , i32 3 }
!23 = !{i32 1 , !"wchar_size" , i32 2 }
!24 = !{i32 7 , !"PIC Level" , i32 2 }
!25 = !{!"clang version 11.0.0 (https://github.com/llvm/llvm-project.git 202f144bffd0be254a829924195e1b8ebabcbb79)" }