<div dir="ltr">Why was this patch reverted? (please include info, including, if possible, links to/quotes from buildbots - in a reply here, and in the future, please include that in the commit message)</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, May 6, 2020 at 12:24 PM Alexandre Ganea via llvm-commits <<a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
Author: Alexandre Ganea<br>
Date: 2020-05-06T15:23:58-04:00<br>
New Revision: f78b674de4531c9092ab1c0c7e4c00196f24e06c<br>
<br>
URL: <a href="https://github.com/llvm/llvm-project/commit/f78b674de4531c9092ab1c0c7e4c00196f24e06c" rel="noreferrer" target="_blank">https://github.com/llvm/llvm-project/commit/f78b674de4531c9092ab1c0c7e4c00196f24e06c</a><br>
DIFF: <a href="https://github.com/llvm/llvm-project/commit/f78b674de4531c9092ab1c0c7e4c00196f24e06c.diff" rel="noreferrer" target="_blank">https://github.com/llvm/llvm-project/commit/f78b674de4531c9092ab1c0c7e4c00196f24e06c.diff</a><br>
<br>
LOG: Revert "[Debug][CodeView] Emit fully qualified names for globals"<br>
<br>
This reverts commit 06591b6d191ad3582d21a801cbaf56b36714cae7.<br>
<br>
Added: <br>
<br>
<br>
Modified: <br>
    llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp<br>
    llvm/test/DebugInfo/COFF/global-constants.ll<br>
    llvm/test/DebugInfo/COFF/global_visibility.ll<br>
    llvm/test/DebugInfo/COFF/globals.ll<br>
    llvm/test/DebugInfo/COFF/types-array-unsized.ll<br>
<br>
Removed: <br>
<br>
<br>
<br>
################################################################################<br>
diff  --git a/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp<br>
index cd75c4085eb9..f167cead4e2c 100644<br>
--- a/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp<br>
+++ b/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp<br>
@@ -3092,14 +3092,6 @@ void CodeViewDebug::emitGlobalVariableList(ArrayRef<CVGlobalVariable> Globals) {<br>
<br>
 void CodeViewDebug::emitDebugInfoForGlobal(const CVGlobalVariable &CVGV) {<br>
   const DIGlobalVariable *DIGV = CVGV.DIGV;<br>
-<br>
-  const DIScope *Scope = DIGV->getScope();<br>
-  // For static data members, get the scope from the declaration.<br>
-  if (const auto *MemberDecl = dyn_cast_or_null<DIDerivedType>(<br>
-          DIGV->getRawStaticDataMemberDeclaration()))<br>
-    Scope = MemberDecl->getScope();<br>
-  std::string QualifiedName = getFullyQualifiedName(Scope, DIGV->getName());<br>
-<br>
   if (const GlobalVariable *GV =<br>
           CVGV.GVInfo.dyn_cast<const GlobalVariable *>()) {<br>
     // DataSym record, see SymbolRecord.h for more info. Thread local data<br>
@@ -3119,9 +3111,13 @@ void CodeViewDebug::emitDebugInfoForGlobal(const CVGlobalVariable &CVGV) {<br>
     OS.EmitCOFFSectionIndex(GVSym);<br>
     OS.AddComment("Name");<br>
     const unsigned LengthOfDataRecord = 12;<br>
-    emitNullTerminatedSymbolName(OS, QualifiedName, LengthOfDataRecord);<br>
+    emitNullTerminatedSymbolName(<br>
+        OS, getFullyQualifiedName(DIGV->getScope(), DIGV->getName()),<br>
+        LengthOfDataRecord);<br>
     endSymbolRecord(DataEnd);<br>
   } else {<br>
+    // FIXME: Currently this only emits the global variables in the IR metadata.<br>
+    // This should also emit enums and static data members.<br>
     const DIExpression *DIE = CVGV.GVInfo.get<const DIExpression *>();<br>
     assert(DIE->isConstant() &&<br>
            "Global constant variables must contain a constant expression.");<br>
@@ -3141,7 +3137,13 @@ void CodeViewDebug::emitDebugInfoForGlobal(const CVGlobalVariable &CVGV) {<br>
     OS.emitBinaryData(SRef);<br>
<br>
     OS.AddComment("Name");<br>
-    emitNullTerminatedSymbolName(OS, QualifiedName);<br>
+    const DIScope *Scope = DIGV->getScope();<br>
+    // For static data members, get the scope from the declaration.<br>
+    if (const auto *MemberDecl = dyn_cast_or_null<DIDerivedType>(<br>
+            DIGV->getRawStaticDataMemberDeclaration()))<br>
+      Scope = MemberDecl->getScope();<br>
+    emitNullTerminatedSymbolName(OS,<br>
+                                 getFullyQualifiedName(Scope, DIGV->getName()));<br>
     endSymbolRecord(SConstantEnd);<br>
   }<br>
 }<br>
<br>
diff  --git a/llvm/test/DebugInfo/COFF/global-constants.ll b/llvm/test/DebugInfo/COFF/global-constants.ll<br>
index d008252e6977..7f68465da00f 100644<br>
--- a/llvm/test/DebugInfo/COFF/global-constants.ll<br>
+++ b/llvm/test/DebugInfo/COFF/global-constants.ll<br>
@@ -1,17 +1,17 @@<br>
 ; RUN: llc < %s | FileCheck %s --check-prefix=ASM<br>
 ; RUN: llc < %s -filetype=obj | llvm-readobj - --codeview | FileCheck %s --check-prefix=OBJ<br>
<br>
-; // C++ source to regenerate:<br>
+; C++ source to regenerate:<br>
 ; namespace Test1 {<br>
 ; const float TestConst1 = 3.14;<br>
 ; }<br>
 ; struct S {<br>
 ;   static const int TestConst2 = -10;<br>
 ;   enum { SEnum = 42 };<br>
-; };<br>
+; }<br>
 ; enum TestEnum : int {<br>
-;   ENUM_A = 2147000000,<br>
-;   ENUM_B = -2147000000,<br>
+;    ENUM_A = 2147000000,<br>
+;    ENUM_B = -2147000000,<br>
 ; };<br>
 ; void useConst(int);<br>
 ; void foo() {<br>
@@ -20,33 +20,27 @@<br>
 ;   useConst(ENUM_B);<br>
 ;   useConst(S::SEnum);<br>
 ; }<br>
-; <br>
-; $ clang a.cpp -S -emit-llvm -g -gcodeview<br>
+; $ clang t.cpp -S -emit-llvm -g -gcodeview -o t.ll<br>
<br>
 ; ASM-LABEL:  .long 241                     # Symbol subsection for globals<br>
-<br>
-; ASM:       .short    4359                    # Record kind: S_CONSTANT<br>
-; ASM-NEXT:      .long 4099                    # Type<br>
-; ASM-NEXT:      .byte 0x04, 0x80, 0xc3, 0xf5  # Value<br>
-; ASM-NEXT:      .byte 0x48, 0x40<br>
-; ASM-NEXT:      .asciz        "Test1::TestConst1"     # Name<br>
-; ASM-NEXT:      .p2align      2<br>
-<br>
-; ASM:       .short    4359                    # Record kind: S_CONSTANT<br>
-; ASM-NEXT:      .long 4100                    # Type<br>
-; ASM-NEXT:      .byte 0x0a, 0x80, 0xf6, 0xff  # Value<br>
-; ASM-NEXT:      .byte 0xff, 0xff, 0xff, 0xff<br>
-; ASM-NEXT:      .byte 0xff, 0xff<br>
-; ASM-NEXT:      .asciz        "S::TestConst2"         # Name<br>
-; ASM-NEXT:      .p2align      2<br>
-<br>
-; ASM:       .short    4359                    # Record kind: S_CONSTANT<br>
-; ASM-NEXT:      .long 4110                    # Type<br>
-; ASM-NEXT:      .byte 0x0a, 0x80, 0x40, 0x61  # Value<br>
-; ASM-NEXT:      .byte 0x07, 0x80, 0xff, 0xff<br>
-; ASM-NEXT:      .byte 0xff, 0xff<br>
-; ASM-NEXT:      .asciz        "ENUM_B"                # Name<br>
-; ASM-NEXT:      .p2align      2<br>
+; ASM:        .short {{.*-.*}}              # Record length<br>
+; ASM:        .short 4359                   # Record kind: S_CONSTANT<br>
+; ASM-NEXT:   .long 4102                    # Type<br>
+; ASM-NEXT:   .byte 0x04, 0x80, 0xc3, 0xf5  # Value<br>
+; ASM-NEXT:   .byte 0x48, 0x40<br>
+; ASM-NEXT:   .asciz "Test1::TestConst1"    # Name<br>
+; ASM:        .short {{.*-.*}}              # Record length<br>
+; ASM:        .short 4359                   # Record kind: S_CONSTANT<br>
+; ASM-NEXT:   .long 4103                    # Type<br>
+; ASM-NEXT:   .byte 0x61, 0x00              # Value<br>
+; ASM-NEXT:   .asciz "S::TestConst2"        # Name<br>
+; ASM:        .short {{.*-.*}}              # Record length<br>
+; ASM:        .short 4359                   # Record kind: S_CONSTANT<br>
+; ASM-NEXT:   .long 4105                    # Type<br>
+; ASM-NEXT:   .byte 0x0a, 0x80, 0x40, 0x61  # Value<br>
+; ASM-NEXT:   .byte 0x07, 0x80, 0xff, 0xff<br>
+; ASM-NEXT:   .byte 0xff, 0xff<br>
+; ASM-NEXT:   .asciz "ENUM_B"               # Name<br>
 ; ASM-NOT:    .asciz "S::SEnum"             # Name<br>
<br>
 ; OBJ:        CodeViewDebugInfo [<br>
@@ -56,85 +50,110 @@<br>
 ; OBJ:            SubSectionType: Symbols (0xF1)<br>
 ; OBJ:            ConstantSym {<br>
 ; OBJ-NEXT:         Kind: S_CONSTANT (0x1107)<br>
-; OBJ-NEXT:         Type: const float (0x1003)<br>
+; OBJ-NEXT:         Type: const float (0x1006)<br>
 ; OBJ-NEXT:         Value: 1078523331<br>
 ; OBJ-NEXT:         Name: Test1::TestConst1<br>
 ; OBJ-NEXT:       }<br>
 ; OBJ-NEXT:       ConstantSym {<br>
 ; OBJ-NEXT:         Kind: S_CONSTANT (0x1107)<br>
-; OBJ-NEXT:         Type: const int (0x1004)<br>
-; OBJ-NEXT:         Value: 18446744073709551606<br>
+; OBJ-NEXT:         Type: const char (0x1007)<br>
+; OBJ-NEXT:         Value: 97<br>
 ; OBJ-NEXT:         Name: S::TestConst2<br>
 ; OBJ-NEXT:       }<br>
 ; OBJ-NEXT:       ConstantSym {<br>
 ; OBJ-NEXT:         Kind: S_CONSTANT (0x1107)<br>
-; OBJ-NEXT:         Type: TestEnum (0x100E)<br>
+; OBJ-NEXT:         Type: TestEnum (0x1009)<br>
 ; OBJ-NEXT:         Value: 18446744071562551616<br>
 ; OBJ-NEXT:         Name: ENUM_B<br>
 ; OBJ-NEXT:       }<br>
 ; OBJ-NOT:          Name: S::SEnum<br>
<br>
-; ModuleID = 'a.cpp'<br>
-source_filename = "a.cpp"<br>
-target datalayout = "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"<br>
-target triple = "x86_64-pc-windows-msvc19.25.28614"<br>
+; ModuleID = 't.cpp'<br>
+source_filename = "t.cpp"<br>
+target datalayout = "e-m:w-i64:64-f80:128-n8:16:32:64-S128"<br>
+target triple = "x86_64-pc-windows-msvc19.16.27030"<br>
+<br>
+; Function Attrs: noinline nounwind optnone uwtable<br>
+define dso_local void @"?useConst@@YAXH@Z"(i32) #0 !dbg !32 {<br>
+entry:<br>
+  %.addr = alloca i32, align 4<br>
+  store i32 %0, i32* %.addr, align 4<br>
+  call void @llvm.dbg.declare(metadata i32* %.addr, metadata !36, metadata !DIExpression()), !dbg !37<br>
+  ret void, !dbg !37<br>
+}<br>
+<br>
+; Function Attrs: nounwind readnone speculatable<br>
+declare void @llvm.dbg.declare(metadata, metadata, metadata) #1<br>
<br>
-; Function Attrs: noinline optnone uwtable<br>
-define dso_local void @"?foo@@YAXXZ"() #0 !dbg !31 {<br>
+; Function Attrs: noinline norecurse nounwind optnone uwtable<br>
+define dso_local i32 @main() #2 !dbg !38 {<br>
 entry:<br>
-  call void @"?useConst@@YAXH@Z"(i32 3), !dbg !35<br>
-  call void @"?useConst@@YAXH@Z"(i32 -10), !dbg !36<br>
-  call void @"?useConst@@YAXH@Z"(i32 -2147000000), !dbg !37<br>
-  call void @"?useConst@@YAXH@Z"(i32 42), !dbg !38<br>
-  ret void, !dbg !39<br>
+  %retval = alloca i32, align 4<br>
+  store i32 0, i32* %retval, align 4<br>
+  call void @"?useConst@@YAXH@Z"(i32 3), !dbg !41<br>
+  call void @"?useConst@@YAXH@Z"(i32 97), !dbg !42<br>
+  call void @"?useConst@@YAXH@Z"(i32 -2147000000), !dbg !43<br>
+  call void @"?useConst@@YAXH@Z"(i32 42), !dbg !44<br>
+  call void @llvm.debugtrap(), !dbg !45<br>
+  ret i32 0, !dbg !46<br>
 }<br>
<br>
-declare dso_local void @"?useConst@@YAXH@Z"(i32) #1<br>
+; Function Attrs: nounwind<br>
+declare void @llvm.debugtrap() #3<br>
<br>
-attributes #0 = { noinline 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" }<br>
-attributes #1 = { "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="none" "less-precise-fpmad"="false" "no-infs-fp-math"="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" }<br>
+attributes #0 = { noinline nounwind optnone uwtable "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "less-precise-fpmad"="false" "min-legal-vector-width"="0" "frame-pointer"="none" "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" }<br>
+attributes #1 = { nounwind readnone speculatable }<br>
+attributes #2 = { noinline norecurse nounwind optnone uwtable "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "less-precise-fpmad"="false" "min-legal-vector-width"="0" "frame-pointer"="none" "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" }<br>
+attributes #3 = { nounwind }<br>
<br>
 !<a href="http://llvm.dbg.cu" rel="noreferrer" target="_blank">llvm.dbg.cu</a> = !{!0}<br>
-!llvm.module.flags = !{!26, !27, !28, !29}<br>
-!llvm.ident = !{!30}<br>
+!llvm.module.flags = !{!27, !28, !29, !30}<br>
+!llvm.ident = !{!31}<br>
<br>
-!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus_14, file: !1, producer: "clang version 11.0.0 (<a href="https://github.com/llvm/llvm-project.git" rel="noreferrer" target="_blank">https://github.com/llvm/llvm-project.git</a> 202f144bffd0be254a829924195e1b8ebabcbb79)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, retainedTypes: !15, globals: !16, nameTableKind: None)<br>
-!1 = !DIFile(filename: "a.cpp", directory: "F:\\llvm-project\\__test", checksumkind: CSK_MD5, checksum: "a1dbf3aabea9e8f9d1be48f60287942f")<br>
-!2 = !{!3, !11}<br>
-!3 = !DICompositeType(tag: DW_TAG_enumeration_type, scope: !4, file: !1, line: 6, baseType: !8, size: 32, elements: !9, identifier: ".?AW4<unnamed-enum-SEnum>@S@@")<br>
+!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "clang version 9.0.0 (<a href="https://github.com/llvm/llvm-project.git" rel="noreferrer" target="_blank">https://github.com/llvm/llvm-project.git</a> f60f863075c7056f26e701b0405fc5752f0db576)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, retainedTypes: !16, globals: !17, nameTableKind: None)<br>
+!1 = !DIFile(filename: "t.cpp", directory: "C:\5Csrc\5Ctesting", checksumkind: CSK_MD5, checksum: "70da26ef1009521e2127bf71f8d532a2")<br>
+!2 = !{!3, !12}<br>
+!3 = !DICompositeType(tag: DW_TAG_enumeration_type, scope: !4, file: !1, line: 6, baseType: !9, size: 32, elements: !10, identifier: ".?AW4<unnamed-enum-SEnum>@S@@")<br>
 !4 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "S", file: !1, line: 4, size: 8, flags: DIFlagTypePassByValue, elements: !5, identifier: ".?AUS@@")<br>
 !5 = !{!6, !3}<br>
-!6 = !DIDerivedType(tag: DW_TAG_member, name: "TestConst2", scope: !4, file: !1, line: 5, baseType: !7, flags: DIFlagStaticMember, extraData: i32 -10)<br>
+!6 = !DIDerivedType(tag: DW_TAG_member, name: "TestConst2", scope: !4, file: !1, line: 5, baseType: !7, flags: DIFlagStaticMember, extraData: i8 97)<br>
 !7 = !DIDerivedType(tag: DW_TAG_const_type, baseType: !8)<br>
-!8 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)<br>
-!9 = !{!10}<br>
-!10 = !DIEnumerator(name: "SEnum", value: 42)<br>
-!11 = !DICompositeType(tag: DW_TAG_enumeration_type, name: "TestEnum", file: !1, line: 8, baseType: !8, size: 32, elements: !12, identifier: ".?AW4TestEnum@@")<br>
-!12 = !{!13, !14}<br>
-!13 = !DIEnumerator(name: "ENUM_A", value: 2147000000)<br>
-!14 = !DIEnumerator(name: "ENUM_B", value: -2147000000)<br>
-!15 = !{!4}<br>
-!16 = !{!17, !22, !24}<br>
-!17 = !DIGlobalVariableExpression(var: !18, expr: !DIExpression(DW_OP_constu, 1078523331, DW_OP_stack_value))<br>
-!18 = distinct !DIGlobalVariable(name: "TestConst1", scope: !19, file: !1, line: 2, type: !20, isLocal: true, isDefinition: true)<br>
-!19 = !DINamespace(name: "Test1", scope: null)<br>
-!20 = !DIDerivedType(tag: DW_TAG_const_type, baseType: !21)<br>
-!21 = !DIBasicType(name: "float", size: 32, encoding: DW_ATE_float)<br>
-!22 = !DIGlobalVariableExpression(var: !23, expr: !DIExpression(DW_OP_constu, 18446744073709551606, DW_OP_stack_value))<br>
-!23 = distinct !DIGlobalVariable(name: "TestConst2", scope: !0, file: !1, line: 5, type: !7, isLocal: true, isDefinition: true, declaration: !6)<br>
-!24 = !DIGlobalVariableExpression(var: !25, expr: !DIExpression(DW_OP_constu, 18446744071562551616, DW_OP_stack_value))<br>
-!25 = distinct !DIGlobalVariable(name: "ENUM_B", scope: !0, file: !1, line: 10, type: !11, isLocal: true, isDefinition: true)<br>
-!26 = !{i32 2, !"CodeView", i32 1}<br>
-!27 = !{i32 2, !"Debug Info Version", i32 3}<br>
-!28 = !{i32 1, !"wchar_size", i32 2}<br>
-!29 = !{i32 7, !"PIC Level", i32 2}<br>
-!30 = !{!"clang version 11.0.0 (<a href="https://github.com/llvm/llvm-project.git" rel="noreferrer" target="_blank">https://github.com/llvm/llvm-project.git</a> 202f144bffd0be254a829924195e1b8ebabcbb79)"}<br>
-!31 = distinct !DISubprogram(name: "foo", linkageName: "?foo@@YAXXZ", scope: !1, file: !1, line: 13, type: !32, scopeLine: 13, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !34)<br>
-!32 = !DISubroutineType(types: !33)<br>
-!33 = !{null}<br>
-!34 = !{}<br>
-!35 = !DILocation(line: 14, scope: !31)<br>
-!36 = !DILocation(line: 15, scope: !31)<br>
-!37 = !DILocation(line: 16, scope: !31)<br>
-!38 = !DILocation(line: 17, scope: !31)<br>
-!39 = !DILocation(line: 18, scope: !31)<br>
+!8 = !DIBasicType(name: "char", size: 8, encoding: DW_ATE_signed_char)<br>
+!9 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)<br>
+!10 = !{!11}<br>
+!11 = !DIEnumerator(name: "SEnum", value: 42)<br>
+!12 = !DICompositeType(tag: DW_TAG_enumeration_type, name: "TestEnum", file: !1, line: 8, baseType: !9, size: 32, elements: !13, identifier: ".?AW4TestEnum@@")<br>
+!13 = !{!14, !15}<br>
+!14 = !DIEnumerator(name: "ENUM_A", value: 2147000000)<br>
+!15 = !DIEnumerator(name: "ENUM_B", value: -2147000000)<br>
+!16 = !{!4}<br>
+!17 = !{!18, !23, !25}<br>
+!18 = !DIGlobalVariableExpression(var: !19, expr: !DIExpression(DW_OP_constu, 1078523331, DW_OP_stack_value))<br>
+!19 = distinct !DIGlobalVariable(name: "TestConst1", scope: !20, file: !1, line: 2, type: !21, isLocal: true, isDefinition: true)<br>
+!20 = !DINamespace(name: "Test1", scope: null)<br>
+!21 = !DIDerivedType(tag: DW_TAG_const_type, baseType: !22)<br>
+!22 = !DIBasicType(name: "float", size: 32, encoding: DW_ATE_float)<br>
+!23 = !DIGlobalVariableExpression(var: !24, expr: !DIExpression(DW_OP_constu, 97, DW_OP_stack_value))<br>
+!24 = distinct !DIGlobalVariable(name: "TestConst2", scope: !0, file: !1, line: 5, type: !7, isLocal: true, isDefinition: true, declaration: !6)<br>
+!25 = !DIGlobalVariableExpression(var: !26, expr: !DIExpression(DW_OP_constu, 18446744071562551616, DW_OP_stack_value))<br>
+!26 = distinct !DIGlobalVariable(name: "ENUM_B", scope: !0, file: !1, line: 10, type: !12, isLocal: true, isDefinition: true)<br>
+!27 = !{i32 2, !"CodeView", i32 1}<br>
+!28 = !{i32 2, !"Debug Info Version", i32 3}<br>
+!29 = !{i32 1, !"wchar_size", i32 2}<br>
+!30 = !{i32 7, !"PIC Level", i32 2}<br>
+!31 = !{!"clang version 9.0.0 (<a href="https://github.com/llvm/llvm-project.git" rel="noreferrer" target="_blank">https://github.com/llvm/llvm-project.git</a> f60f863075c7056f26e701b0405fc5752f0db576)"}<br>
+!32 = distinct !DISubprogram(name: "useConst", linkageName: "?useConst@@YAXH@Z", scope: !1, file: !1, line: 12, type: !33, scopeLine: 12, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !35)<br>
+!33 = !DISubroutineType(types: !34)<br>
+!34 = !{null, !9}<br>
+!35 = !{}<br>
+!36 = !DILocalVariable(arg: 1, scope: !32, file: !1, line: 12, type: !9)<br>
+!37 = !DILocation(line: 12, scope: !32)<br>
+!38 = distinct !DISubprogram(name: "main", scope: !1, file: !1, line: 13, type: !39, scopeLine: 13, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !35)<br>
+!39 = !DISubroutineType(types: !40)<br>
+!40 = !{!9}<br>
+!41 = !DILocation(line: 14, scope: !38)<br>
+!42 = !DILocation(line: 15, scope: !38)<br>
+!43 = !DILocation(line: 16, scope: !38)<br>
+!44 = !DILocation(line: 17, scope: !38)<br>
+!45 = !DILocation(line: 18, scope: !38)<br>
+!46 = !DILocation(line: 19, scope: !38)<br>
<br>
diff  --git a/llvm/test/DebugInfo/COFF/global_visibility.ll b/llvm/test/DebugInfo/COFF/global_visibility.ll<br>
index 4a5eff8a6b28..8a3e8307785c 100644<br>
--- a/llvm/test/DebugInfo/COFF/global_visibility.ll<br>
+++ b/llvm/test/DebugInfo/COFF/global_visibility.ll<br>
@@ -3,36 +3,34 @@<br>
 ; This test verifies global variables are emitted within the correct scope.<br>
 ;<br>
 ; -- global_visibility.cpp ----------------------------------------------------<br>
-; int global_int = 0;<br>
-; <br>
-; template <typename T> struct A {<br>
-;   static T comdat_int;<br>
-;   static T set(T value) {<br>
-;     T r = comdat_int;<br>
-;     comdat_int = value;<br>
-;     return r;<br>
-;   };<br>
-; };<br>
-; <br>
-; template <typename T> T A<T>::comdat_int = 42;<br>
-; <br>
-; void foo() {<br>
-;   static int local_int = 1;<br>
-;   {<br>
-;     static int nested_int = 2;<br>
-;     local_int = nested_int;<br>
-;   }<br>
-;   local_int = A<int>::set(42);<br>
-; }<br>
-; <br>
-; void bar() {<br>
-;   static int local_int = 3;<br>
-;   {<br>
-;     static int nested_int = 4;<br>
-;     local_int = nested_int;<br>
-;   }<br>
-;   local_int = A<unsigned>::set(42);<br>
-; }<br>
+;  1   <br>
+;  2   int global_int = 0;<br>
+;  3   <br>
+;  4   template <typename T> struct A {<br>
+;  5     static T comdat_int;<br>
+;  6     static T set(T value) { T r = comdat_int; comdat_int = value; return r; };<br>
+;  7   };<br>
+;  8   <br>
+;  9   template <typename T> T A<T>::comdat_int = 42;<br>
+; 10   <br>
+; 11   void foo() {<br>
+; 12     static int local_int = 1;<br>
+; 13     {<br>
+; 14       static int nested_int = 2;<br>
+; 15       local_int = nested_int;<br>
+; 16     }<br>
+; 17     local_int = A<int>::set(42);<br>
+; 18   }<br>
+; 19   <br>
+; 20   void bar() {<br>
+; 21     static int local_int = 3;<br>
+; 22     {<br>
+; 23       static int nested_int = 4;<br>
+; 24       local_int = nested_int;<br>
+; 25     }<br>
+; 26     local_int = A<unsigned>::set(42);<br>
+; 27   }<br>
+; 28   <br>
 ; -----------------------------------------------------------------------------<br>
 ;<br>
 ; $ clang -S -emit-llvm -g -gcodeview global_visibility.cpp<br>
@@ -56,11 +54,17 @@<br>
 ; CHECK:       DisplayName: foo::local_int<br>
 ; CHECK:       LinkageName: ?local_int@?1??foo@@YAXXZ@4HA<br>
 ; CHECK:     }<br>
+; CHECK:     BlockSym {<br>
+; CHECK:       Kind: S_BLOCK32 (0x1103)<br>
+; CHECK:     }<br>
 ; CHECK:     DataSym {<br>
 ; CHECK:       Kind: S_LDATA32 (0x110C)<br>
 ; CHECK:       DisplayName: foo::nested_int<br>
 ; CHECK:       LinkageName: ?nested_int@?1??foo@@YAXXZ@4HA<br>
 ; CHECK:     }<br>
+; CHECK:     ScopeEndSym {<br>
+; CHECK:       Kind: S_END (0x6)<br>
+; CHECK:     }<br>
 ; CHECK:     ProcEnd {<br>
 ; CHECK:       Kind: S_PROC_ID_END (0x114F)<br>
 ; CHECK:     }<br>
@@ -77,11 +81,17 @@<br>
 ; CHECK:       DisplayName: bar::local_int<br>
 ; CHECK:       LinkageName: ?local_int@?1??bar@@YAXXZ@4HA<br>
 ; CHECK:     }<br>
+; CHECK:     BlockSym {<br>
+; CHECK:       Kind: S_BLOCK32 (0x1103)<br>
+; CHECK:     }<br>
 ; CHECK:     DataSym {<br>
 ; CHECK:       Kind: S_LDATA32 (0x110C)<br>
 ; CHECK:       DisplayName: bar::nested_int<br>
 ; CHECK:       LinkageName: ?nested_int@?1??bar@@YAXXZ@4HA<br>
 ; CHECK:     }<br>
+; CHECK:     ScopeEndSym {<br>
+; CHECK:       Kind: S_END (0x6)<br>
+; CHECK:     }<br>
 ; CHECK:     ProcEnd {<br>
 ; CHECK:       Kind: S_PROC_ID_END (0x114F)<br>
 ; CHECK:     }<br>
@@ -101,7 +111,7 @@<br>
 ; CHECK:     SubSectionType: Symbols (0xF1)<br>
 ; CHECK:     GlobalData {<br>
 ; CHECK:       Kind: S_GDATA32 (0x110D)<br>
-; CHECK:       DisplayName: A<int>::comdat_int<br>
+; CHECK:       DisplayName: comdat_int<br>
 ; CHECK:       LinkageName: ?comdat_int@?$A@H@@2HA<br>
 ; CHECK:     }<br>
 ; CHECK:   ]<br>
@@ -112,17 +122,17 @@<br>
 ; CHECK:     SubSectionType: Symbols (0xF1)<br>
 ; CHECK:     GlobalData {<br>
 ; CHECK:       Kind: S_GDATA32 (0x110D)<br>
-; CHECK:       DisplayName: A<unsigned int>::comdat_int<br>
+; CHECK:       DisplayName: comdat_int<br>
 ; CHECK:       LinkageName: ?comdat_int@?$A@I@@2IA<br>
 ; CHECK:     }<br>
 ; CHECK:   ]<br>
 ; CHECK: ]<br>
 ;<br>
<br>
-; ModuleID = 'a.cpp'<br>
-source_filename = "a.cpp"<br>
-target datalayout = "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"<br>
-target triple = "x86_64-pc-windows-msvc19.25.28614"<br>
+; ModuleID = 'global_visibility.cpp'<br>
+source_filename = "global_visibility.cpp"<br>
+target datalayout = "e-m:w-i64:64-f80:128-n8:16:32:64-S128"<br>
+target triple = "x86_64-pc-windows-msvc19.15.26730"<br>
<br>
 $"?set@?$A@H@@SAHH@Z" = comdat any<br>
<br>
@@ -157,88 +167,88 @@ entry:<br>
   %r = alloca i32, align 4<br>
   store i32 %value, i32* %value.addr, align 4<br>
   call void @llvm.dbg.declare(metadata i32* %value.addr, metadata !50, metadata !DIExpression()), !dbg !51<br>
-  call void @llvm.dbg.declare(metadata i32* %r, metadata !52, metadata !DIExpression()), !dbg !53<br>
-  %0 = load i32, i32* @"?comdat_int@?$A@H@@2HA", align 4, !dbg !53<br>
-  store i32 %0, i32* %r, align 4, !dbg !53<br>
-  %1 = load i32, i32* %value.addr, align 4, !dbg !54<br>
-  store i32 %1, i32* @"?comdat_int@?$A@H@@2HA", align 4, !dbg !54<br>
-  %2 = load i32, i32* %r, align 4, !dbg !55<br>
-  ret i32 %2, !dbg !55<br>
+  call void @llvm.dbg.declare(metadata i32* %r, metadata !52, metadata !DIExpression()), !dbg !51<br>
+  %0 = load i32, i32* @"?comdat_int@?$A@H@@2HA", align 4, !dbg !51<br>
+  store i32 %0, i32* %r, align 4, !dbg !51<br>
+  %1 = load i32, i32* %value.addr, align 4, !dbg !51<br>
+  store i32 %1, i32* @"?comdat_int@?$A@H@@2HA", align 4, !dbg !51<br>
+  %2 = load i32, i32* %r, align 4, !dbg !51<br>
+  ret i32 %2, !dbg !51<br>
 }<br>
<br>
 ; Function Attrs: noinline optnone uwtable<br>
 define dso_local void @"?bar@@YAXXZ"() #0 !dbg !16 {<br>
 entry:<br>
-  %0 = load i32, i32* @"?nested_int@?1??bar@@YAXXZ@4HA", align 4, !dbg !56<br>
-  store i32 %0, i32* @"?local_int@?1??bar@@YAXXZ@4HA", align 4, !dbg !56<br>
-  %call = call i32 @"?set@?$A@I@@SAII@Z"(i32 42), !dbg !58<br>
-  store i32 %call, i32* @"?local_int@?1??bar@@YAXXZ@4HA", align 4, !dbg !58<br>
-  ret void, !dbg !59<br>
+  %0 = load i32, i32* @"?nested_int@?1??bar@@YAXXZ@4HA", align 4, !dbg !53<br>
+  store i32 %0, i32* @"?local_int@?1??bar@@YAXXZ@4HA", align 4, !dbg !53<br>
+  %call = call i32 @"?set@?$A@I@@SAII@Z"(i32 42), !dbg !55<br>
+  store i32 %call, i32* @"?local_int@?1??bar@@YAXXZ@4HA", align 4, !dbg !55<br>
+  ret void, !dbg !56<br>
 }<br>
<br>
 ; Function Attrs: noinline nounwind optnone uwtable<br>
-define linkonce_odr dso_local i32 @"?set@?$A@I@@SAII@Z"(i32 %value) #1 comdat align 2 !dbg !60 {<br>
+define linkonce_odr dso_local i32 @"?set@?$A@I@@SAII@Z"(i32 %value) #1 comdat align 2 !dbg !57 {<br>
 entry:<br>
   %value.addr = alloca i32, align 4<br>
   %r = alloca i32, align 4<br>
   store i32 %value, i32* %value.addr, align 4<br>
-  call void @llvm.dbg.declare(metadata i32* %value.addr, metadata !61, metadata !DIExpression()), !dbg !62<br>
-  call void @llvm.dbg.declare(metadata i32* %r, metadata !63, metadata !DIExpression()), !dbg !64<br>
-  %0 = load i32, i32* @"?comdat_int@?$A@I@@2IA", align 4, !dbg !64<br>
-  store i32 %0, i32* %r, align 4, !dbg !64<br>
-  %1 = load i32, i32* %value.addr, align 4, !dbg !65<br>
-  store i32 %1, i32* @"?comdat_int@?$A@I@@2IA", align 4, !dbg !65<br>
-  %2 = load i32, i32* %r, align 4, !dbg !66<br>
-  ret i32 %2, !dbg !66<br>
+  call void @llvm.dbg.declare(metadata i32* %value.addr, metadata !58, metadata !DIExpression()), !dbg !59<br>
+  call void @llvm.dbg.declare(metadata i32* %r, metadata !60, metadata !DIExpression()), !dbg !59<br>
+  %0 = load i32, i32* @"?comdat_int@?$A@I@@2IA", align 4, !dbg !59<br>
+  store i32 %0, i32* %r, align 4, !dbg !59<br>
+  %1 = load i32, i32* %value.addr, align 4, !dbg !59<br>
+  store i32 %1, i32* @"?comdat_int@?$A@I@@2IA", align 4, !dbg !59<br>
+  %2 = load i32, i32* %r, align 4, !dbg !59<br>
+  ret i32 %2, !dbg !59<br>
 }<br>
<br>
-; Function Attrs: nounwind readnone speculatable willreturn<br>
+; Function Attrs: nounwind readnone speculatable<br>
 declare void @llvm.dbg.declare(metadata, metadata, metadata) #2<br>
<br>
-attributes #0 = { noinline 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" }<br>
-attributes #1 = { 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" }<br>
-attributes #2 = { nounwind readnone speculatable willreturn }<br>
+attributes #0 = { noinline optnone uwtable "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "less-precise-fpmad"="false" "min-legal-vector-width"="0" "frame-pointer"="none" "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"="+fxsr,+mmx,+sse,+sse2,+x87" "unsafe-fp-math"="false" "use-soft-float"="false" }<br>
+attributes #1 = { noinline nounwind optnone uwtable "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "less-precise-fpmad"="false" "min-legal-vector-width"="0" "frame-pointer"="none" "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"="+fxsr,+mmx,+sse,+sse2,+x87" "unsafe-fp-math"="false" "use-soft-float"="false" }<br>
+attributes #2 = { nounwind readnone speculatable }<br>
<br>
 !<a href="http://llvm.dbg.cu" rel="noreferrer" target="_blank">llvm.dbg.cu</a> = !{!2}<br>
 !llvm.module.flags = !{!40, !41, !42, !43}<br>
 !llvm.ident = !{!44}<br>
<br>
 !0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression())<br>
-!1 = distinct !DIGlobalVariable(name: "global_int", linkageName: "?global_int@@3HA", scope: !2, file: !3, line: 1, type: !11, isLocal: false, isDefinition: true)<br>
-!2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus_14, file: !3, producer: "clang version 11.0.0 (<a href="https://github.com/llvm/llvm-project.git" rel="noreferrer" target="_blank">https://github.com/llvm/llvm-project.git</a> 202f144bffd0be254a829924195e1b8ebabcbb79)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !4, globals: !5, nameTableKind: None)<br>
-!3 = !DIFile(filename: "a.cpp", directory: "F:\\llvm-project\\__test", checksumkind: CSK_MD5, checksum: "66a5399777dc9d37656fb00438bca542")<br>
+!1 = distinct !DIGlobalVariable(name: "global_int", linkageName: "?global_int@@3HA", scope: !2, file: !3, line: 2, type: !11, isLocal: false, isDefinition: true)<br>
+!2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "clang version 8.0.0 (trunk)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !4, globals: !5, nameTableKind: None)<br>
+!3 = !DIFile(filename: "global_visibility.cpp", directory: "C:\5Cpath\5Cto\5Cdirectory", checksumkind: CSK_MD5, checksum: "f59b9e5de12391471b1a61888cb68a3e")<br>
 !4 = !{}<br>
 !5 = !{!0, !6, !12, !14, !17, !19, !29}<br>
 !6 = !DIGlobalVariableExpression(var: !7, expr: !DIExpression())<br>
-!7 = distinct !DIGlobalVariable(name: "local_int", scope: !8, file: !3, line: 15, type: !11, isLocal: true, isDefinition: true)<br>
-!8 = distinct !DISubprogram(name: "foo", linkageName: "?foo@@YAXXZ", scope: !3, file: !3, line: 14, type: !9, scopeLine: 14, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !4)<br>
+!7 = distinct !DIGlobalVariable(name: "local_int", scope: !8, file: !3, line: 12, type: !11, isLocal: true, isDefinition: true)<br>
+!8 = distinct !DISubprogram(name: "foo", linkageName: "?foo@@YAXXZ", scope: !3, file: !3, line: 11, type: !9, scopeLine: 11, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !4)<br>
 !9 = !DISubroutineType(types: !10)<br>
 !10 = !{null}<br>
 !11 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)<br>
 !12 = !DIGlobalVariableExpression(var: !13, expr: !DIExpression())<br>
-!13 = distinct !DIGlobalVariable(name: "nested_int", scope: !8, file: !3, line: 17, type: !11, isLocal: true, isDefinition: true)<br>
+!13 = distinct !DIGlobalVariable(name: "nested_int", scope: !46, file: !3, line: 14, type: !11, isLocal: true, isDefinition: true)<br>
 !14 = !DIGlobalVariableExpression(var: !15, expr: !DIExpression())<br>
-!15 = distinct !DIGlobalVariable(name: "local_int", scope: !16, file: !3, line: 24, type: !11, isLocal: true, isDefinition: true)<br>
-!16 = distinct !DISubprogram(name: "bar", linkageName: "?bar@@YAXXZ", scope: !3, file: !3, line: 23, type: !9, scopeLine: 23, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !4)<br>
+!15 = distinct !DIGlobalVariable(name: "local_int", scope: !16, file: !3, line: 21, type: !11, isLocal: true, isDefinition: true)<br>
+!16 = distinct !DISubprogram(name: "bar", linkageName: "?bar@@YAXXZ", scope: !3, file: !3, line: 20, type: !9, scopeLine: 20, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !4)<br>
 !17 = !DIGlobalVariableExpression(var: !18, expr: !DIExpression())<br>
-!18 = distinct !DIGlobalVariable(name: "nested_int", scope: !16, file: !3, line: 26, type: !11, isLocal: true, isDefinition: true)<br>
+!18 = distinct !DIGlobalVariable(name: "nested_int", scope: !54, file: !3, line: 23, type: !11, isLocal: true, isDefinition: true)<br>
 !19 = !DIGlobalVariableExpression(var: !20, expr: !DIExpression())<br>
-!20 = distinct !DIGlobalVariable(name: "comdat_int", linkageName: "?comdat_int@?$A@H@@2HA", scope: !2, file: !3, line: 12, type: !11, isLocal: false, isDefinition: true, declaration: !21)<br>
-!21 = !DIDerivedType(tag: DW_TAG_member, name: "comdat_int", scope: !22, file: !3, line: 4, baseType: !11, flags: DIFlagStaticMember)<br>
-!22 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "A<int>", file: !3, line: 3, size: 8, flags: DIFlagTypePassByValue, elements: !23, templateParams: !27, identifier: ".?AU?$A@H@@")<br>
+!20 = distinct !DIGlobalVariable(name: "comdat_int", linkageName: "?comdat_int@?$A@H@@2HA", scope: !2, file: !3, line: 9, type: !11, isLocal: false, isDefinition: true, declaration: !21)<br>
+!21 = !DIDerivedType(tag: DW_TAG_member, name: "comdat_int", scope: !22, file: !3, line: 5, baseType: !11, flags: DIFlagStaticMember)<br>
+!22 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "A<int>", file: !3, line: 4, size: 8, flags: DIFlagTypePassByValue, elements: !23, templateParams: !27, identifier: ".?AU?$A@H@@")<br>
 !23 = !{!21, !24}<br>
-!24 = !DISubprogram(name: "set", linkageName: "?set@?$A@H@@SAHH@Z", scope: !22, file: !3, line: 5, type: !25, scopeLine: 5, flags: DIFlagPrototyped | DIFlagStaticMember, spFlags: 0)<br>
+!24 = !DISubprogram(name: "set", linkageName: "?set@?$A@H@@SAHH@Z", scope: !22, file: !3, line: 6, type: !25, scopeLine: 6, flags: DIFlagPrototyped | DIFlagStaticMember, spFlags: 0)<br>
 !25 = !DISubroutineType(types: !26)<br>
 !26 = !{!11, !11}<br>
 !27 = !{!28}<br>
 !28 = !DITemplateTypeParameter(name: "T", type: !11)<br>
 !29 = !DIGlobalVariableExpression(var: !30, expr: !DIExpression())<br>
-!30 = distinct !DIGlobalVariable(name: "comdat_int", linkageName: "?comdat_int@?$A@I@@2IA", scope: !2, file: !3, line: 12, type: !31, isLocal: false, isDefinition: true, declaration: !32)<br>
+!30 = distinct !DIGlobalVariable(name: "comdat_int", linkageName: "?comdat_int@?$A@I@@2IA", scope: !2, file: !3, line: 9, type: !31, isLocal: false, isDefinition: true, declaration: !32)<br>
 !31 = !DIBasicType(name: "unsigned int", size: 32, encoding: DW_ATE_unsigned)<br>
-!32 = !DIDerivedType(tag: DW_TAG_member, name: "comdat_int", scope: !33, file: !3, line: 4, baseType: !31, flags: DIFlagStaticMember)<br>
-!33 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "A<unsigned int>", file: !3, line: 3, size: 8, flags: DIFlagTypePassByValue, elements: !34, templateParams: !38, identifier: ".?AU?$A@I@@")<br>
+!32 = !DIDerivedType(tag: DW_TAG_member, name: "comdat_int", scope: !33, file: !3, line: 5, baseType: !31, flags: DIFlagStaticMember)<br>
+!33 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "A<unsigned int>", file: !3, line: 4, size: 8, flags: DIFlagTypePassByValue, elements: !34, templateParams: !38, identifier: ".?AU?$A@I@@")<br>
 !34 = !{!32, !35}<br>
-!35 = !DISubprogram(name: "set", linkageName: "?set@?$A@I@@SAII@Z", scope: !33, file: !3, line: 5, type: !36, scopeLine: 5, flags: DIFlagPrototyped | DIFlagStaticMember, spFlags: 0)<br>
+!35 = !DISubprogram(name: "set", linkageName: "?set@?$A@I@@SAII@Z", scope: !33, file: !3, line: 6, type: !36, scopeLine: 6, flags: DIFlagPrototyped | DIFlagStaticMember, spFlags: 0)<br>
 !36 = !DISubroutineType(types: !37)<br>
 !37 = !{!31, !31}<br>
 !38 = !{!39}<br>
@@ -247,26 +257,20 @@ attributes #2 = { nounwind readnone speculatable willreturn }<br>
 !41 = !{i32 2, !"Debug Info Version", i32 3}<br>
 !42 = !{i32 1, !"wchar_size", i32 2}<br>
 !43 = !{i32 7, !"PIC Level", i32 2}<br>
-!44 = !{!"clang version 11.0.0 (<a href="https://github.com/llvm/llvm-project.git" rel="noreferrer" target="_blank">https://github.com/llvm/llvm-project.git</a> 202f144bffd0be254a829924195e1b8ebabcbb79)"}<br>
-!45 = !DILocation(line: 18, scope: !46)<br>
-!46 = distinct !DILexicalBlock(scope: !8, file: !3, line: 16)<br>
-!47 = !DILocation(line: 20, scope: !8)<br>
-!48 = !DILocation(line: 21, scope: !8)<br>
-!49 = distinct !DISubprogram(name: "set", linkageName: "?set@?$A@H@@SAHH@Z", scope: !22, file: !3, line: 5, type: !25, scopeLine: 5, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, declaration: !24, retainedNodes: !4)<br>
-!50 = !DILocalVariable(name: "value", arg: 1, scope: !49, file: !3, line: 5, type: !11)<br>
-!51 = !DILocation(line: 5, scope: !49)<br>
+!44 = !{!"clang version 8.0.0 (trunk)"}<br>
+!45 = !DILocation(line: 15, scope: !46)<br>
+!46 = distinct !DILexicalBlock(scope: !8, file: !3, line: 13)<br>
+!47 = !DILocation(line: 17, scope: !8)<br>
+!48 = !DILocation(line: 18, scope: !8)<br>
+!49 = distinct !DISubprogram(name: "set", linkageName: "?set@?$A@H@@SAHH@Z", scope: !22, file: !3, line: 6, type: !25, scopeLine: 6, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, declaration: !24, retainedNodes: !4)<br>
+!50 = !DILocalVariable(name: "value", arg: 1, scope: !49, file: !3, line: 6, type: !11)<br>
+!51 = !DILocation(line: 6, scope: !49)<br>
 !52 = !DILocalVariable(name: "r", scope: !49, file: !3, line: 6, type: !11)<br>
-!53 = !DILocation(line: 6, scope: !49)<br>
-!54 = !DILocation(line: 7, scope: !49)<br>
-!55 = !DILocation(line: 8, scope: !49)<br>
-!56 = !DILocation(line: 27, scope: !57)<br>
-!57 = distinct !DILexicalBlock(scope: !16, file: !3, line: 25)<br>
-!58 = !DILocation(line: 29, scope: !16)<br>
-!59 = !DILocation(line: 30, scope: !16)<br>
-!60 = distinct !DISubprogram(name: "set", linkageName: "?set@?$A@I@@SAII@Z", scope: !33, file: !3, line: 5, type: !36, scopeLine: 5, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, declaration: !35, retainedNodes: !4)<br>
-!61 = !DILocalVariable(name: "value", arg: 1, scope: !60, file: !3, line: 5, type: !31)<br>
-!62 = !DILocation(line: 5, scope: !60)<br>
-!63 = !DILocalVariable(name: "r", scope: !60, file: !3, line: 6, type: !31)<br>
-!64 = !DILocation(line: 6, scope: !60)<br>
-!65 = !DILocation(line: 7, scope: !60)<br>
-!66 = !DILocation(line: 8, scope: !60)<br>
+!53 = !DILocation(line: 24, scope: !54)<br>
+!54 = distinct !DILexicalBlock(scope: !16, file: !3, line: 22)<br>
+!55 = !DILocation(line: 26, scope: !16)<br>
+!56 = !DILocation(line: 27, scope: !16)<br>
+!57 = distinct !DISubprogram(name: "set", linkageName: "?set@?$A@I@@SAII@Z", scope: !33, file: !3, line: 6, type: !36, scopeLine: 6, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, declaration: !35, retainedNodes: !4)<br>
+!58 = !DILocalVariable(name: "value", arg: 1, scope: !57, file: !3, line: 6, type: !31)<br>
+!59 = !DILocation(line: 6, scope: !57)<br>
+!60 = !DILocalVariable(name: "r", scope: !57, file: !3, line: 6, type: !31)<br>
<br>
diff  --git a/llvm/test/DebugInfo/COFF/globals.ll b/llvm/test/DebugInfo/COFF/globals.ll<br>
index 583f108f3f49..3312e81618a9 100644<br>
--- a/llvm/test/DebugInfo/COFF/globals.ll<br>
+++ b/llvm/test/DebugInfo/COFF/globals.ll<br>
@@ -6,44 +6,19 @@<br>
 ; C++ source to regenerate:<br>
 ; $ cat a.cpp<br>
 ; int first;<br>
-; <br>
 ; template <typename T> struct A { static const int comdat = 3; };<br>
-; <br>
 ; thread_local const int *middle = &A<void>::comdat;<br>
-; <br>
 ; namespace foo {<br>
 ; thread_local int globalTLS = 4;<br>
 ; static thread_local int staticTLS = 5;<br>
 ; int justGlobal = 6;<br>
 ; static int globalStatic = 7;<br>
-; constexpr int constExpr = 8;<br>
-; const int constVal = 9;<br>
-; <br>
-; struct Data {<br>
-;   inline static thread_local int DataStaticTLS = 11;<br>
-;   int DataGlobal = 12;<br>
-;   inline static int DataStatic = 13;<br>
-;   constexpr static int DataConstExpr = 14;<br>
-;   const int DataConstVal = 15;<br>
-; };<br>
-; } // namespace foo<br>
-; <br>
+; }<br>
 ; int last;<br>
-; <br>
 ; int bar() {<br>
-;   struct Local {<br>
-;     int LocalGlobal = 12;<br>
-;     const int LocalConstVal = 15;<br>
-;   };<br>
-;   foo::Data D;<br>
-;   Local L;<br>
-;   return foo::globalStatic + foo::globalTLS + foo::staticTLS + foo::justGlobal +<br>
-;          foo::globalStatic + foo::constExpr + foo::constVal + D.DataStaticTLS +<br>
-;          D.DataGlobal + D.DataStatic + D.DataConstExpr + D.DataConstVal +<br>
-;          L.LocalGlobal + L.LocalConstVal;<br>
+;   return foo::globalStatic + foo::globalTLS + foo::staticTLS;<br>
 ; }<br>
-; <br>
-; $ clang-cl a.cpp /c /GS- /Z7 /GR- /std:c++17 /clang:-S /clang:-emit-llvm<br>
+; $ clang-cl a.cpp /c /Z7 /GS- /clang:-S /clang:-emit-llvm<br>
<br>
 ; ASM:        .section        .debug$S,"dr"<br>
 ; ASM-NEXT:   .p2align        2<br>
@@ -57,7 +32,7 @@<br>
 ; ASM-NEXT:   .p2align        2<br>
<br>
 ; ASM:        .short  4371                    # Record kind: S_GTHREAD32<br>
-; ASM-NEXT:   .long   4117                    # Type<br>
+; ASM-NEXT:   .long   4100                    # Type<br>
 ; ASM-NEXT:   .secrel32       "?middle@@3PEBHEB" # DataOffset<br>
 ; ASM-NEXT:   .secidx "?middle@@3PEBHEB"      # Segment<br>
 ; ASM-NEXT:   .asciz  "middle"                # Name<br>
@@ -84,24 +59,6 @@<br>
 ; ASM-NEXT:   .asciz  "last"                  # Name<br>
 ; ASM-NEXT:   .p2align        2<br>
<br>
-; ASM:        .short   4359                    # Record kind: S_CONSTANT<br>
-; ASM-NEXT:      .long 4100                    # Type<br>
-; ASM-NEXT:   .byte    0x08, 0x00              # Value<br>
-; ASM-NEXT:      .asciz        "foo::constExpr"        # Name<br>
-; ASM-NEXT:   .p2align 2<br>
-<br>
-; ASM:        .short   4359                    # Record kind: S_CONSTANT<br>
-; ASM-NEXT:   .long    4100                    # Type<br>
-; ASM-NEXT:   .byte    0x09, 0x00              # Value<br>
-; ASM-NEXT:   .asciz   "foo::constVal"         # Name<br>
-; ASM-NEXT:   .p2align 2<br>
-<br>
-; ASM:        .short   4359                    # Record kind: S_CONSTANT<br>
-; ASM-NEXT:   .long    4100                    # Type<br>
-; ASM-NEXT:   .byte    0x0e, 0x00              # Value<br>
-; ASM-NEXT:   .asciz   "foo::Data::DataConstExpr" # Name<br>
-; ASM-NEXT:   .p2align 2<br>
-<br>
 ; ASM:        .short  4364                    # Record kind: S_LDATA32<br>
 ; ASM-NEXT:   .long   116                     # Type<br>
 ; ASM-NEXT:   .secrel32       "?globalStatic@foo@@3HA" # DataOffset<br>
@@ -121,30 +78,10 @@<br>
 ; ASM-NEXT:   .long   4                       # Debug section magic<br>
<br>
 ; ASM:        .short  4365                    # Record kind: S_GDATA32<br>
-; ASM-NEXT:   .long   4100                    # Type<br>
+; ASM-NEXT:   .long   4099                    # Type<br>
 ; ASM-NEXT:   .secrel32       "?comdat@?$A@X@@2HB" # DataOffset<br>
 ; ASM-NEXT:   .secidx "?comdat@?$A@X@@2HB"    # Segment<br>
-; ASM-NEXT:   .asciz  "A<void>::comdat"       # Name<br>
-<br>
-; ASM:       .section  .debug$S,"dr",associative,"?DataStaticTLS@Data@foo@@2HA"<br>
-; ASM-NEXT:      .p2align      2               # Symbol subsection for ?DataStaticTLS@Data@foo@@2HA<br>
-<br>
-; ASM:       .short    4371                    # Record kind: S_GTHREAD32<br>
-; ASM-NEXT:      .long 116                     # Type<br>
-; ASM-NEXT:      .secrel32     "?DataStaticTLS@Data@foo@@2HA" # DataOffset<br>
-; ASM-NEXT:      .secidx       "?DataStaticTLS@Data@foo@@2HA" # Segment<br>
-; ASM-NEXT:      .asciz        "foo::Data::DataStaticTLS"         # Name<br>
-; ASM-NEXT:   .p2align 2<br>
-<br>
-; ASM:        .section        .debug$S,"dr",associative,"?DataStatic@Data@foo@@2HA"<br>
-; ASM-NEXT:   .p2align        2               # Symbol subsection for ?DataStatic@Data@foo@@2HA<br>
-<br>
-; ASM:        .short  4365                    # Record kind: S_GDATA32<br>
-; ASM-NEXT:   .long   116                     # Type<br>
-; ASM-NEXT:   .secrel32       "?DataStatic@Data@foo@@2HA" # DataOffset<br>
-; ASM-NEXT:   .secidx "?DataStatic@Data@foo@@2HA" # Segment<br>
-; ASM-NEXT:   .asciz  "foo::Data::DataStatic" # Name<br>
-; ASM-NEXT:   .p2align        2<br>
+; ASM-NEXT:   .asciz  "comdat"                # Name<br>
<br>
 ; OBJ: CodeViewDebugInfo [<br>
 ; OBJ:   Section: .debug$S<br>
@@ -161,7 +98,7 @@<br>
 ; OBJ-NEXT:     GlobalTLS {<br>
 ; OBJ-NEXT:       Kind: S_GTHREAD32 (0x1113)<br>
 ; OBJ-NEXT:       DataOffset: ?middle@@3PEBHEB+0x0<br>
-; OBJ-NEXT:       Type: const int* (0x1015)<br>
+; OBJ-NEXT:       Type: const int* (0x1004)<br>
 ; OBJ-NEXT:       DisplayName: middle<br>
 ; OBJ-NEXT:       LinkageName: ?middle@@3PEBHEB<br>
 ; OBJ-NEXT:     }<br>
@@ -186,24 +123,6 @@<br>
 ; OBJ-NEXT:       DisplayName: last<br>
 ; OBJ-NEXT:       LinkageName: ?last@@3HA<br>
 ; OBJ-NEXT:     }<br>
-; OBJ-NEXT:    ConstantSym {<br>
-; OBJ-NEXT:      Kind: S_CONSTANT (0x1107)<br>
-; OBJ-NEXT:      Type: const int (0x1004)<br>
-; OBJ-NEXT:      Value: 8<br>
-; OBJ-NEXT:      Name: foo::constExpr<br>
-; OBJ-NEXT:    }<br>
-; OBJ-NEXT:    ConstantSym {<br>
-; OBJ-NEXT:      Kind: S_CONSTANT (0x1107)<br>
-; OBJ-NEXT:      Type: const int (0x1004)<br>
-; OBJ-NEXT:      Value: 9<br>
-; OBJ-NEXT:      Name: foo::constVal<br>
-; OBJ-NEXT:    }<br>
-; OBJ-NEXT:    ConstantSym {<br>
-; OBJ-NEXT:      Kind: S_CONSTANT (0x1107)<br>
-; OBJ-NEXT:      Type: const int (0x1004)<br>
-; OBJ-NEXT:      Value: 14<br>
-; OBJ-NEXT:      Name: foo::Data::DataConstExpr<br>
-; OBJ-NEXT:    }<br>
 ; OBJ-NEXT:     DataSym {<br>
 ; OBJ-NEXT:       Kind: S_LDATA32 (0x110C)<br>
 ; OBJ-NEXT:       DataOffset: ?globalStatic@foo@@3HA+0x0<br>
@@ -222,26 +141,10 @@<br>
 ; OBJ:    GlobalData {<br>
 ; OBJ-NEXT:      Kind: S_GDATA32 (0x110D)<br>
 ; OBJ-LABEL:      DataOffset: ?comdat@?$A@X@@2HB+0x0<br>
-; OBJ-NEXT:      Type: const int (0x1004)<br>
-; OBJ-NEXT:      DisplayName: A<void>::comdat<br>
+; OBJ-NEXT:      Type: const int (0x1003)<br>
+; OBJ-NEXT:      DisplayName: comdat<br>
 ; OBJ-NEXT:      LinkageName: ?comdat@?$A@X@@2HB<br>
<br>
-; OBJ:    GlobalTLS {<br>
-; OBJ-NEXT:      Kind: S_GTHREAD32 (0x1113)<br>
-; OBJ-NEXT:      DataOffset: ?DataStaticTLS@Data@foo@@2HA+0x0<br>
-; OBJ-NEXT:      Type: int (0x74)<br>
-; OBJ-NEXT:      DisplayName: foo::Data::DataStaticTLS<br>
-; OBJ-NEXT:      LinkageName: ?DataStaticTLS@Data@foo@@2HA<br>
-; OBJ-NEXT:    }<br>
-<br>
-; OBJ:    GlobalData {<br>
-; OBJ-NEXT:      Kind: S_GDATA32 (0x110D)<br>
-; OBJ-NEXT:      DataOffset: ?DataStatic@Data@foo@@2HA+0x0<br>
-; OBJ-NEXT:      Type: int (0x74)<br>
-; OBJ-NEXT:      DisplayName: foo::Data::DataStatic<br>
-; OBJ-NEXT:      LinkageName: ?DataStatic@Data@foo@@2HA<br>
-; OBJ-NEXT:    }<br>
-<br>
 ; YAML-LABEL:  - Name:            '.debug$S'<br>
 ; YAML:    Subsections:<br>
 ; YAML:      - !Symbols<br>
@@ -260,7 +163,7 @@<br>
 ; YAML-NOT: Segment<br>
 ; YAML-NEXT:          - Kind:            S_GTHREAD32<br>
 ; YAML-NEXT:            ThreadLocalDataSym:<br>
-; YAML-NEXT:              Type:            4117<br>
+; YAML-NEXT:              Type:            4100<br>
 ; YAML-NEXT:              DisplayName:     middle<br>
 ; YAML-NEXT:          - Kind:            S_GTHREAD32<br>
 ; YAML-NEXT:            ThreadLocalDataSym:<br>
@@ -277,21 +180,6 @@<br>
 ; YAML-NEXT:            DataSym:<br>
 ; YAML-NEXT:              Type:            116<br>
 ; YAML-NEXT:              DisplayName:     last<br>
-; YAML-NEXT:          - Kind:            S_CONSTANT<br>
-; YAML-NEXT:            ConstantSym:<br>
-; YAML-NEXT:              Type:            4100<br>
-; YAML-NEXT:              Value:           8<br>
-; YAML-NEXT:              Name:            'foo::constExpr'<br>
-; YAML-NEXT:          - Kind:            S_CONSTANT<br>
-; YAML-NEXT:            ConstantSym:<br>
-; YAML-NEXT:              Type:            4100<br>
-; YAML-NEXT:              Value:           9<br>
-; YAML-NEXT:              Name:            'foo::constVal'<br>
-; YAML-NEXT:          - Kind:            S_CONSTANT<br>
-; YAML-NEXT:            ConstantSym:<br>
-; YAML-NEXT:              Type:            4100<br>
-; YAML-NEXT:              Value:           14<br>
-; YAML-NEXT:              Name:            'foo::Data::DataConstExpr'<br>
 ; YAML-NEXT:          - Kind:            S_LDATA32<br>
 ; YAML-NEXT:            DataSym:<br>
 ; YAML-NEXT:              Type:            116<br>
@@ -306,189 +194,72 @@ source_filename = "a.cpp"<br>
 target datalayout = "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"<br>
 target triple = "x86_64-pc-windows-msvc19.25.28614"<br>
<br>
-%"struct.foo::Data" = type { i32, i32 }<br>
-%struct.Local = type { i32, i32 }<br>
-<br>
-$"??0Data@foo@@QEAA@XZ" = comdat any<br>
-<br>
 $"?comdat@?$A@X@@2HB" = comdat any<br>
<br>
-$"?DataStaticTLS@Data@foo@@2HA" = comdat any<br>
-<br>
-$"?DataStatic@Data@foo@@2HA" = comdat any<br>
-<br>
 @"?first@@3HA" = dso_local global i32 0, align 4, !dbg !0<br>
-@"?comdat@?$A@X@@2HB" = linkonce_odr dso_local constant i32 3, comdat, align 4, !dbg !17<br>
-@"?middle@@3PEBHEB" = dso_local thread_local global i32* @"?comdat@?$A@X@@2HB", align 8, !dbg !24<br>
-@"?globalTLS@foo@@3HA" = dso_local thread_local global i32 4, align 4, !dbg !27<br>
-@"?justGlobal@foo@@3HA" = dso_local global i32 6, align 4, !dbg !29<br>
-@"?last@@3HA" = dso_local global i32 0, align 4, !dbg !31<br>
-@"?globalStatic@foo@@3HA" = internal global i32 7, align 4, !dbg !43<br>
-@"?staticTLS@foo@@3HA" = internal thread_local global i32 5, align 4, !dbg !45<br>
-@"?DataStaticTLS@Data@foo@@2HA" = linkonce_odr dso_local thread_local global i32 11, comdat, align 4, !dbg !37<br>
-@"?DataStatic@Data@foo@@2HA" = linkonce_odr dso_local global i32 13, comdat, align 4, !dbg !39<br>
-<br>
-; Function Attrs: noinline nounwind optnone uwtable<br>
-define dso_local i32 @"?bar@@YAHXZ"() #0 !dbg !54 {<br>
-entry:<br>
-  %D = alloca %"struct.foo::Data", align 4<br>
-  %L = alloca %struct.Local, align 4<br>
-  call void @llvm.dbg.declare(metadata %"struct.foo::Data"* %D, metadata !57, metadata !DIExpression()), !dbg !58<br>
-  %call = call %"struct.foo::Data"* @"??0Data@foo@@QEAA@XZ"(%"struct.foo::Data"* %D) #2, !dbg !58<br>
-  call void @llvm.dbg.declare(metadata %struct.Local* %L, metadata !59, metadata !DIExpression()), !dbg !64<br>
-  %call1 = call %struct.Local* @"??0Local@?1??bar@@YAHXZ@QEAA@XZ"(%struct.Local* %L) #2, !dbg !64<br>
-  %0 = load i32, i32* @"?globalStatic@foo@@3HA", align 4, !dbg !65<br>
-  %1 = load i32, i32* @"?globalTLS@foo@@3HA", align 4, !dbg !65<br>
-  %add = add nsw i32 %0, %1, !dbg !65<br>
-  %2 = load i32, i32* @"?staticTLS@foo@@3HA", align 4, !dbg !65<br>
-  %add2 = add nsw i32 %add, %2, !dbg !65<br>
-  %3 = load i32, i32* @"?justGlobal@foo@@3HA", align 4, !dbg !65<br>
-  %add3 = add nsw i32 %add2, %3, !dbg !65<br>
-  %4 = load i32, i32* @"?globalStatic@foo@@3HA", align 4, !dbg !65<br>
-  %add4 = add nsw i32 %add3, %4, !dbg !65<br>
-  %add5 = add nsw i32 %add4, 8, !dbg !65<br>
-  %add6 = add nsw i32 %add5, 9, !dbg !65<br>
-  %5 = load i32, i32* @"?DataStaticTLS@Data@foo@@2HA", align 4, !dbg !65<br>
-  %add7 = add nsw i32 %add6, %5, !dbg !65<br>
-  %DataGlobal = getelementptr inbounds %"struct.foo::Data", %"struct.foo::Data"* %D, i32 0, i32 0, !dbg !65<br>
-  %6 = load i32, i32* %DataGlobal, align 4, !dbg !65<br>
-  %add8 = add nsw i32 %add7, %6, !dbg !65<br>
-  %7 = load i32, i32* @"?DataStatic@Data@foo@@2HA", align 4, !dbg !65<br>
-  %add9 = add nsw i32 %add8, %7, !dbg !65<br>
-  %add10 = add nsw i32 %add9, 14, !dbg !65<br>
-  %DataConstVal = getelementptr inbounds %"struct.foo::Data", %"struct.foo::Data"* %D, i32 0, i32 1, !dbg !65<br>
-  %8 = load i32, i32* %DataConstVal, align 4, !dbg !65<br>
-  %add11 = add nsw i32 %add10, %8, !dbg !65<br>
-  %LocalGlobal = getelementptr inbounds %struct.Local, %struct.Local* %L, i32 0, i32 0, !dbg !65<br>
-  %9 = load i32, i32* %LocalGlobal, align 4, !dbg !65<br>
-  %add12 = add nsw i32 %add11, %9, !dbg !65<br>
-  %LocalConstVal = getelementptr inbounds %struct.Local, %struct.Local* %L, i32 0, i32 1, !dbg !65<br>
-  %10 = load i32, i32* %LocalConstVal, align 4, !dbg !65<br>
-  %add13 = add nsw i32 %add12, %10, !dbg !65<br>
-  ret i32 %add13, !dbg !65<br>
-}<br>
-<br>
-; Function Attrs: nounwind readnone speculatable willreturn<br>
-declare void @llvm.dbg.declare(metadata, metadata, metadata) #1<br>
-<br>
-; Function Attrs: noinline nounwind optnone uwtable<br>
-define linkonce_odr dso_local %"struct.foo::Data"* @"??0Data@foo@@QEAA@XZ"(%"struct.foo::Data"* returned %this) unnamed_addr #0 comdat align 2 !dbg !66 {<br>
-entry:<br>
-  %this.addr = alloca %"struct.foo::Data"*, align 8<br>
-  store %"struct.foo::Data"* %this, %"struct.foo::Data"** %this.addr, align 8<br>
-  call void @llvm.dbg.declare(metadata %"struct.foo::Data"** %this.addr, metadata !71, metadata !DIExpression()), !dbg !73<br>
-  %this1 = load %"struct.foo::Data"*, %"struct.foo::Data"** %this.addr, align 8<br>
-  %DataGlobal = getelementptr inbounds %"struct.foo::Data", %"struct.foo::Data"* %this1, i32 0, i32 0, !dbg !74<br>
-  store i32 12, i32* %DataGlobal, align 4, !dbg !74<br>
-  %DataConstVal = getelementptr inbounds %"struct.foo::Data", %"struct.foo::Data"* %this1, i32 0, i32 1, !dbg !74<br>
-  store i32 15, i32* %DataConstVal, align 4, !dbg !74<br>
-  ret %"struct.foo::Data"* %this1, !dbg !74<br>
-}<br>
+@"?comdat@?$A@X@@2HB" = linkonce_odr dso_local constant i32 3, comdat, align 4, !dbg !6<br>
+@"?middle@@3PEBHEB" = dso_local thread_local global i32* @"?comdat@?$A@X@@2HB", align 8, !dbg !15<br>
+@"?globalTLS@foo@@3HA" = dso_local thread_local global i32 4, align 4, !dbg !18<br>
+@"?justGlobal@foo@@3HA" = dso_local global i32 6, align 4, !dbg !21<br>
+@"?last@@3HA" = dso_local global i32 0, align 4, !dbg !23<br>
+@"?globalStatic@foo@@3HA" = internal global i32 7, align 4, !dbg !25<br>
+@"?staticTLS@foo@@3HA" = internal thread_local global i32 5, align 4, !dbg !27<br>
<br>
 ; Function Attrs: noinline nounwind optnone uwtable<br>
-define internal %struct.Local* @"??0Local@?1??bar@@YAHXZ@QEAA@XZ"(%struct.Local* returned %this) unnamed_addr #0 align 2 !dbg !75 {<br>
+define dso_local i32 @"?bar@@YAHXZ"() #0 !dbg !36 {<br>
 entry:<br>
-  %this.addr = alloca %struct.Local*, align 8<br>
-  store %struct.Local* %this, %struct.Local** %this.addr, align 8<br>
-  call void @llvm.dbg.declare(metadata %struct.Local** %this.addr, metadata !80, metadata !DIExpression()), !dbg !82<br>
-  %this1 = load %struct.Local*, %struct.Local** %this.addr, align 8<br>
-  %LocalGlobal = getelementptr inbounds %struct.Local, %struct.Local* %this1, i32 0, i32 0, !dbg !83<br>
-  store i32 12, i32* %LocalGlobal, align 4, !dbg !83<br>
-  %LocalConstVal = getelementptr inbounds %struct.Local, %struct.Local* %this1, i32 0, i32 1, !dbg !83<br>
-  store i32 15, i32* %LocalConstVal, align 4, !dbg !83<br>
-  ret %struct.Local* %this1, !dbg !83<br>
+  %0 = load i32, i32* @"?globalStatic@foo@@3HA", align 4, !dbg !39<br>
+  %1 = load i32, i32* @"?globalTLS@foo@@3HA", align 4, !dbg !39<br>
+  %add = add nsw i32 %0, %1, !dbg !39<br>
+  %2 = load i32, i32* @"?staticTLS@foo@@3HA", align 4, !dbg !39<br>
+  %add1 = add nsw i32 %add, %2, !dbg !39<br>
+  ret i32 %add1, !dbg !39<br>
 }<br>
<br>
 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" }<br>
-attributes #1 = { nounwind readnone speculatable willreturn }<br>
-attributes #2 = { nounwind }<br>
<br>
 !<a href="http://llvm.dbg.cu" rel="noreferrer" target="_blank">llvm.dbg.cu</a> = !{!2}<br>
-!llvm.linker.options = !{!47, !48}<br>
-!llvm.module.flags = !{!49, !50, !51, !52}<br>
-!llvm.ident = !{!53}<br>
+!llvm.linker.options = !{!29, !30}<br>
+!llvm.module.flags = !{!31, !32, !33, !34}<br>
+!llvm.ident = !{!35}<br>
<br>
 !0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression())<br>
-!1 = distinct !DIGlobalVariable(name: "first", linkageName: "?first@@3HA", scope: !2, file: !3, line: 1, type: !10, isLocal: false, isDefinition: true)<br>
-!2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus_14, file: !3, producer: "clang version 11.0.0 (<a href="https://github.com/llvm/llvm-project.git" rel="noreferrer" target="_blank">https://github.com/llvm/llvm-project.git</a> 202f144bffd0be254a829924195e1b8ebabcbb79)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !4, retainedTypes: !5, globals: !16, nameTableKind: None)<br>
-!3 = !DIFile(filename: "a.cpp", directory: "F:\\llvm-project\\__test", checksumkind: CSK_MD5, checksum: "ae8137877dbd6fb10cfa1fc9ea4a39ca")<br>
+!1 = distinct !DIGlobalVariable(name: "first", linkageName: "?first@@3HA", scope: !2, file: !3, line: 1, type: !9, isLocal: false, isDefinition: true)<br>
+!2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus_14, file: !3, producer: "clang version 11.0.0 (<a href="https://github.com/llvm/llvm-project.git" rel="noreferrer" target="_blank">https://github.com/llvm/llvm-project.git</a> f5b1301ce8575f6d82e87031a1a5485c33637a93)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !4, globals: !5, nameTableKind: None)<br>
+!3 = !DIFile(filename: "a.cpp", directory: "F:\\llvm-project\\__test", checksumkind: CSK_MD5, checksum: "65c2a7701cffb7a2e8d4caf1cc24caa7")<br>
 !4 = !{}<br>
-!5 = !{!6}<br>
-!6 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "Data", scope: !7, file: !3, line: 15, size: 64, flags: DIFlagTypePassByValue | DIFlagNonTrivial, elements: !8, identifier: ".?AUData@foo@@")<br>
-!7 = !DINamespace(name: "foo", scope: null)<br>
-!8 = !{!9, !11, !12, !13, !15}<br>
-!9 = !DIDerivedType(tag: DW_TAG_member, name: "DataStaticTLS", scope: !6, file: !3, line: 16, baseType: !10, flags: DIFlagStaticMember, extraData: i32 11)<br>
-!10 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)<br>
-!11 = !DIDerivedType(tag: DW_TAG_member, name: "DataGlobal", scope: !6, file: !3, line: 17, baseType: !10, size: 32)<br>
-!12 = !DIDerivedType(tag: DW_TAG_member, name: "DataStatic", scope: !6, file: !3, line: 18, baseType: !10, flags: DIFlagStaticMember, extraData: i32 13)<br>
-!13 = !DIDerivedType(tag: DW_TAG_member, name: "DataConstExpr", scope: !6, file: !3, line: 19, baseType: !14, flags: DIFlagStaticMember, extraData: i32 14)<br>
-!14 = !DIDerivedType(tag: DW_TAG_const_type, baseType: !10)<br>
-!15 = !DIDerivedType(tag: DW_TAG_member, name: "DataConstVal", scope: !6, file: !3, line: 20, baseType: !14, size: 32, offset: 32)<br>
-!16 = !{!0, !17, !24, !27, !29, !31, !33, !35, !37, !39, !41, !43, !45}<br>
-!17 = !DIGlobalVariableExpression(var: !18, expr: !DIExpression())<br>
-!18 = distinct !DIGlobalVariable(name: "comdat", linkageName: "?comdat@?$A@X@@2HB", scope: !2, file: !3, line: 3, type: !14, isLocal: false, isDefinition: true, declaration: !19)<br>
-!19 = !DIDerivedType(tag: DW_TAG_member, name: "comdat", scope: !20, file: !3, line: 3, baseType: !14, flags: DIFlagStaticMember, extraData: i32 3)<br>
-!20 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "A<void>", file: !3, line: 3, size: 8, flags: DIFlagTypePassByValue, elements: !21, templateParams: !22, identifier: ".?AU?$A@X@@")<br>
-!21 = !{!19}<br>
-!22 = !{!23}<br>
-!23 = !DITemplateTypeParameter(name: "T", type: null)<br>
-!24 = !DIGlobalVariableExpression(var: !25, expr: !DIExpression())<br>
-!25 = distinct !DIGlobalVariable(name: "middle", linkageName: "?middle@@3PEBHEB", scope: !2, file: !3, line: 5, type: !26, isLocal: false, isDefinition: true)<br>
-!26 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !14, size: 64)<br>
+!5 = !{!0, !6, !15, !18, !21, !23, !25, !27}<br>
+!6 = !DIGlobalVariableExpression(var: !7, expr: !DIExpression())<br>
+!7 = distinct !DIGlobalVariable(name: "comdat", linkageName: "?comdat@?$A@X@@2HB", scope: !2, file: !3, line: 2, type: !8, isLocal: false, isDefinition: true, declaration: !10)<br>
+!8 = !DIDerivedType(tag: DW_TAG_const_type, baseType: !9)<br>
+!9 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)<br>
+!10 = !DIDerivedType(tag: DW_TAG_member, name: "comdat", scope: !11, file: !3, line: 2, baseType: !8, flags: DIFlagStaticMember, extraData: i32 3)<br>
+!11 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "A<void>", file: !3, line: 2, size: 8, flags: DIFlagTypePassByValue, elements: !12, templateParams: !13, identifier: ".?AU?$A@X@@")<br>
+!12 = !{!10}<br>
+!13 = !{!14}<br>
+!14 = !DITemplateTypeParameter(name: "T", type: null)<br>
+!15 = !DIGlobalVariableExpression(var: !16, expr: !DIExpression())<br>
+!16 = distinct !DIGlobalVariable(name: "middle", linkageName: "?middle@@3PEBHEB", scope: !2, file: !3, line: 3, type: !17, isLocal: false, isDefinition: true)<br>
+!17 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !8, size: 64)<br>
+!18 = !DIGlobalVariableExpression(var: !19, expr: !DIExpression())<br>
+!19 = distinct !DIGlobalVariable(name: "globalTLS", linkageName: "?globalTLS@foo@@3HA", scope: !20, file: !3, line: 5, type: !9, isLocal: false, isDefinition: true)<br>
+!20 = !DINamespace(name: "foo", scope: null)<br>
+!21 = !DIGlobalVariableExpression(var: !22, expr: !DIExpression())<br>
+!22 = distinct !DIGlobalVariable(name: "justGlobal", linkageName: "?justGlobal@foo@@3HA", scope: !20, file: !3, line: 7, type: !9, isLocal: false, isDefinition: true)<br>
+!23 = !DIGlobalVariableExpression(var: !24, expr: !DIExpression())<br>
+!24 = distinct !DIGlobalVariable(name: "last", linkageName: "?last@@3HA", scope: !2, file: !3, line: 10, type: !9, isLocal: false, isDefinition: true)<br>
+!25 = !DIGlobalVariableExpression(var: !26, expr: !DIExpression())<br>
+!26 = distinct !DIGlobalVariable(name: "globalStatic", linkageName: "?globalStatic@foo@@3HA", scope: !20, file: !3, line: 8, type: !9, isLocal: true, isDefinition: true)<br>
 !27 = !DIGlobalVariableExpression(var: !28, expr: !DIExpression())<br>
-!28 = distinct !DIGlobalVariable(name: "globalTLS", linkageName: "?globalTLS@foo@@3HA", scope: !7, file: !3, line: 8, type: !10, isLocal: false, isDefinition: true)<br>
-!29 = !DIGlobalVariableExpression(var: !30, expr: !DIExpression())<br>
-!30 = distinct !DIGlobalVariable(name: "justGlobal", linkageName: "?justGlobal@foo@@3HA", scope: !7, file: !3, line: 10, type: !10, isLocal: false, isDefinition: true)<br>
-!31 = !DIGlobalVariableExpression(var: !32, expr: !DIExpression())<br>
-!32 = distinct !DIGlobalVariable(name: "last", linkageName: "?last@@3HA", scope: !2, file: !3, line: 24, type: !10, isLocal: false, isDefinition: true)<br>
-!33 = !DIGlobalVariableExpression(var: !34, expr: !DIExpression(DW_OP_constu, 8, DW_OP_stack_value))<br>
-!34 = distinct !DIGlobalVariable(name: "constExpr", scope: !7, file: !3, line: 12, type: !14, isLocal: true, isDefinition: true)<br>
-!35 = !DIGlobalVariableExpression(var: !36, expr: !DIExpression(DW_OP_constu, 9, DW_OP_stack_value))<br>
-!36 = distinct !DIGlobalVariable(name: "constVal", scope: !7, file: !3, line: 13, type: !14, isLocal: true, isDefinition: true)<br>
-!37 = !DIGlobalVariableExpression(var: !38, expr: !DIExpression())<br>
-!38 = distinct !DIGlobalVariable(name: "DataStaticTLS", linkageName: "?DataStaticTLS@Data@foo@@2HA", scope: !2, file: !3, line: 16, type: !10, isLocal: false, isDefinition: true, declaration: !9)<br>
-!39 = !DIGlobalVariableExpression(var: !40, expr: !DIExpression())<br>
-!40 = distinct !DIGlobalVariable(name: "DataStatic", linkageName: "?DataStatic@Data@foo@@2HA", scope: !2, file: !3, line: 18, type: !10, isLocal: false, isDefinition: true, declaration: !12)<br>
-!41 = !DIGlobalVariableExpression(var: !42, expr: !DIExpression(DW_OP_constu, 14, DW_OP_stack_value))<br>
-!42 = distinct !DIGlobalVariable(name: "DataConstExpr", scope: !2, file: !3, line: 19, type: !14, isLocal: true, isDefinition: true, declaration: !13)<br>
-!43 = !DIGlobalVariableExpression(var: !44, expr: !DIExpression())<br>
-!44 = distinct !DIGlobalVariable(name: "globalStatic", linkageName: "?globalStatic@foo@@3HA", scope: !7, file: !3, line: 11, type: !10, isLocal: true, isDefinition: true)<br>
-!45 = !DIGlobalVariableExpression(var: !46, expr: !DIExpression())<br>
-!46 = distinct !DIGlobalVariable(name: "staticTLS", linkageName: "?staticTLS@foo@@3HA", scope: !7, file: !3, line: 9, type: !10, isLocal: true, isDefinition: true)<br>
-!47 = !{!"/DEFAULTLIB:libcmt.lib"}<br>
-!48 = !{!"/DEFAULTLIB:oldnames.lib"}<br>
-!49 = !{i32 2, !"CodeView", i32 1}<br>
-!50 = !{i32 2, !"Debug Info Version", i32 3}<br>
-!51 = !{i32 1, !"wchar_size", i32 2}<br>
-!52 = !{i32 7, !"PIC Level", i32 2}<br>
-!53 = !{!"clang version 11.0.0 (<a href="https://github.com/llvm/llvm-project.git" rel="noreferrer" target="_blank">https://github.com/llvm/llvm-project.git</a> 202f144bffd0be254a829924195e1b8ebabcbb79)"}<br>
-!54 = distinct !DISubprogram(name: "bar", linkageName: "?bar@@YAHXZ", scope: !3, file: !3, line: 26, type: !55, scopeLine: 26, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !4)<br>
-!55 = !DISubroutineType(types: !56)<br>
-!56 = !{!10}<br>
-!57 = !DILocalVariable(name: "D", scope: !54, file: !3, line: 31, type: !6)<br>
-!58 = !DILocation(line: 31, scope: !54)<br>
-!59 = !DILocalVariable(name: "L", scope: !54, file: !3, line: 32, type: !60)<br>
-!60 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "Local", scope: !54, file: !3, line: 27, size: 64, flags: DIFlagTypePassByValue | DIFlagNonTrivial, elements: !61, identifier: ".?AULocal@?1??bar@@YAHXZ@")<br>
-!61 = !{!62, !63}<br>
-!62 = !DIDerivedType(tag: DW_TAG_member, name: "LocalGlobal", scope: !60, file: !3, line: 28, baseType: !10, size: 32)<br>
-!63 = !DIDerivedType(tag: DW_TAG_member, name: "LocalConstVal", scope: !60, file: !3, line: 29, baseType: !14, size: 32, offset: 32)<br>
-!64 = !DILocation(line: 32, scope: !54)<br>
-!65 = !DILocation(line: 33, scope: !54)<br>
-!66 = distinct !DISubprogram(name: "Data", linkageName: "??0Data@foo@@QEAA@XZ", scope: !6, file: !3, line: 15, type: !67, scopeLine: 15, flags: DIFlagArtificial | DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, declaration: !70, retainedNodes: !4)<br>
-!67 = !DISubroutineType(types: !68)<br>
-!68 = !{null, !69}<br>
-!69 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !6, size: 64, flags: DIFlagArtificial | DIFlagObjectPointer)<br>
-!70 = !DISubprogram(name: "Data", scope: !6, type: !67, flags: DIFlagArtificial | DIFlagPrototyped, spFlags: 0)<br>
-!71 = !DILocalVariable(name: "this", arg: 1, scope: !66, type: !72, flags: DIFlagArtificial | DIFlagObjectPointer)<br>
-!72 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !6, size: 64)<br>
-!73 = !DILocation(line: 0, scope: !66)<br>
-!74 = !DILocation(line: 15, scope: !66)<br>
-!75 = distinct !DISubprogram(name: "Local", linkageName: "??0Local@?1??bar@@YAHXZ@QEAA@XZ", scope: !60, file: !3, line: 27, type: !76, scopeLine: 27, flags: DIFlagArtificial | DIFlagPrototyped, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !2, declaration: !79, retainedNodes: !4)<br>
-!76 = !DISubroutineType(types: !77)<br>
-!77 = !{null, !78}<br>
-!78 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !60, size: 64, flags: DIFlagArtificial | DIFlagObjectPointer)<br>
-!79 = !DISubprogram(name: "Local", scope: !60, type: !76, flags: DIFlagArtificial | DIFlagPrototyped, spFlags: 0)<br>
-!80 = !DILocalVariable(name: "this", arg: 1, scope: !75, type: !81, flags: DIFlagArtificial | DIFlagObjectPointer)<br>
-!81 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !60, size: 64)<br>
-!82 = !DILocation(line: 0, scope: !75)<br>
-!83 = !DILocation(line: 27, scope: !75)<br>
+!28 = distinct !DIGlobalVariable(name: "staticTLS", linkageName: "?staticTLS@foo@@3HA", scope: !20, file: !3, line: 6, type: !9, isLocal: true, isDefinition: true)<br>
+!29 = !{!"/DEFAULTLIB:libcmt.lib"}<br>
+!30 = !{!"/DEFAULTLIB:oldnames.lib"}<br>
+!31 = !{i32 2, !"CodeView", i32 1}<br>
+!32 = !{i32 2, !"Debug Info Version", i32 3}<br>
+!33 = !{i32 1, !"wchar_size", i32 2}<br>
+!34 = !{i32 7, !"PIC Level", i32 2}<br>
+!35 = !{!"clang version 11.0.0 (<a href="https://github.com/llvm/llvm-project.git" rel="noreferrer" target="_blank">https://github.com/llvm/llvm-project.git</a> f5b1301ce8575f6d82e87031a1a5485c33637a93)"}<br>
+!36 = distinct !DISubprogram(name: "bar", linkageName: "?bar@@YAHXZ", scope: !3, file: !3, line: 11, type: !37, scopeLine: 11, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !4)<br>
+!37 = !DISubroutineType(types: !38)<br>
+!38 = !{!9}<br>
+!39 = !DILocation(line: 12, scope: !36)<br>
<br>
diff  --git a/llvm/test/DebugInfo/COFF/types-array-unsized.ll b/llvm/test/DebugInfo/COFF/types-array-unsized.ll<br>
index de0bcfff988d..abfcbbfebd32 100644<br>
--- a/llvm/test/DebugInfo/COFF/types-array-unsized.ll<br>
+++ b/llvm/test/DebugInfo/COFF/types-array-unsized.ll<br>
@@ -4,7 +4,7 @@<br>
 ; We should emit two array types: one used to describe the static data member,<br>
 ; and the other used by the S_GDATA32 for the definition.<br>
<br>
-; // Build with: clang-cl a.cpp /c /Z7 /clang:-S /clang:-emit-llvm<br>
+; C++ source:<br>
 ; struct Foo {<br>
 ;   static const char str[];<br>
 ; };<br>
@@ -41,34 +41,33 @@<br>
 ; CHECK-NEXT:       Kind: S_GDATA32 (0x110D)<br>
 ; CHECK-NEXT:       DataOffset: ?str@Foo@@2QBDB+0x0<br>
 ; CHECK-NEXT:       Type: [[ARRAY_COMPLETE]]<br>
-; CHECK-NEXT:       DisplayName: Foo::str<br>
+; CHECK-NEXT:       DisplayName: str<br>
 ; CHECK-NEXT:       LinkageName: ?str@Foo@@2QBDB<br>
 ; CHECK-NEXT:     }<br>
<br>
-; ModuleID = 'a.cpp'<br>
-source_filename = "a.cpp"<br>
-target datalayout = "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"<br>
-target triple = "x86_64-pc-windows-msvc19.25.28614"<br>
+; ModuleID = 't.cpp'<br>
+source_filename = "t.cpp"<br>
+target datalayout = "e-m:w-i64:64-f80:128-n8:16:32:64-S128"<br>
+target triple = "x86_64-pc-windows-msvc19.0.24215"<br>
<br>
 %struct.Foo = type { i8 }<br>
<br>
-@"?str@Foo@@2QBDB" = dso_local constant [5 x i8] c"asdf\00", align 1, !dbg !0<br>
-@"?f@@3UFoo@@A" = dso_local global %struct.Foo zeroinitializer, align 1, !dbg !6<br>
+@"\01?str@Foo@@2QBDB" = constant [5 x i8] c"asdf\00", align 1, !dbg !0<br>
+@"\01?f@@3UFoo@@A" = global %struct.Foo zeroinitializer, align 1, !dbg !6<br>
<br>
 !<a href="http://llvm.dbg.cu" rel="noreferrer" target="_blank">llvm.dbg.cu</a> = !{!2}<br>
-!llvm.linker.options = !{!19, !20}<br>
-!llvm.module.flags = !{!21, !22, !23, !24}<br>
-!llvm.ident = !{!25}<br>
+!llvm.module.flags = !{!19, !20, !21, !22}<br>
+!llvm.ident = !{!23}<br>
<br>
 !0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression())<br>
-!1 = distinct !DIGlobalVariable(name: "str", linkageName: "?str@Foo@@2QBDB", scope: !2, file: !3, line: 4, type: !16, isLocal: false, isDefinition: true, declaration: !10)<br>
-!2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus_14, file: !3, producer: "clang version 11.0.0 (<a href="https://github.com/llvm/llvm-project.git" rel="noreferrer" target="_blank">https://github.com/llvm/llvm-project.git</a> 202f144bffd0be254a829924195e1b8ebabcbb79)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !4, globals: !5, nameTableKind: None)<br>
-!3 = !DIFile(filename: "a.cpp", directory: "F:\\llvm-project\\__test", checksumkind: CSK_MD5, checksum: "c2b2d28fd8aaa040c4141cea420d0648")<br>
+!1 = distinct !DIGlobalVariable(name: "str", linkageName: "\01?str@Foo@@2QBDB", scope: !2, file: !3, line: 4, type: !16, isLocal: false, isDefinition: true, declaration: !10)<br>
+!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)<br>
+!3 = !DIFile(filename: "t.cpp", directory: "C:\5Csrc\5Cllvm-project\5Cbuild", checksumkind: CSK_MD5, checksum: "15aa843c5a80301928caf03e71f87a54")<br>
 !4 = !{}<br>
 !5 = !{!0, !6}<br>
 !6 = !DIGlobalVariableExpression(var: !7, expr: !DIExpression())<br>
-!7 = distinct !DIGlobalVariable(name: "f", linkageName: "?f@@3UFoo@@A", scope: !2, file: !3, line: 5, type: !8, isLocal: false, isDefinition: true)<br>
-!8 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "Foo", file: !3, line: 1, size: 8, flags: DIFlagTypePassByValue, elements: !9, identifier: ".?AUFoo@@")<br>
+!7 = distinct !DIGlobalVariable(name: "f", linkageName: "\01?f@@3UFoo@@A", scope: !2, file: !3, line: 5, type: !8, isLocal: false, isDefinition: true)<br>
+!8 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "Foo", file: !3, line: 1, size: 8, elements: !9, identifier: ".?AUFoo@@")<br>
 !9 = !{!10}<br>
 !10 = !DIDerivedType(tag: DW_TAG_member, name: "str", scope: !8, file: !3, line: 2, baseType: !11, flags: DIFlagStaticMember)<br>
 !11 = !DICompositeType(tag: DW_TAG_array_type, baseType: !12, elements: !14)<br>
@@ -79,10 +78,8 @@ target triple = "x86_64-pc-windows-msvc19.25.28614"<br>
 !16 = !DICompositeType(tag: DW_TAG_array_type, baseType: !12, size: 40, elements: !17)<br>
 !17 = !{!18}<br>
 !18 = !DISubrange(count: 5)<br>
-!19 = !{!"/DEFAULTLIB:libcmt.lib"}<br>
-!20 = !{!"/DEFAULTLIB:oldnames.lib"}<br>
-!21 = !{i32 2, !"CodeView", i32 1}<br>
-!22 = !{i32 2, !"Debug Info Version", i32 3}<br>
-!23 = !{i32 1, !"wchar_size", i32 2}<br>
-!24 = !{i32 7, !"PIC Level", i32 2}<br>
-!25 = !{!"clang version 11.0.0 (<a href="https://github.com/llvm/llvm-project.git" rel="noreferrer" target="_blank">https://github.com/llvm/llvm-project.git</a> 202f144bffd0be254a829924195e1b8ebabcbb79)"}<br>
+!19 = !{i32 2, !"CodeView", i32 1}<br>
+!20 = !{i32 2, !"Debug Info Version", i32 3}<br>
+!21 = !{i32 1, !"wchar_size", i32 2}<br>
+!22 = !{i32 7, !"PIC Level", i32 2}<br>
+!23 = !{!"clang version 6.0.0 "}<br>
<br>
<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a><br>
<a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br>
</blockquote></div>