DebugInfo: Improve IR annotation comments for GNU pubthings.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191043 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
index a814b72..a5b5905 100644
--- a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
+++ b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
@@ -2401,8 +2401,11 @@
       Asm->EmitInt32(Entity->getOffset());
 
       if (GnuStyle) {
-        Asm->OutStreamer.AddComment("Index value");
-        Asm->EmitInt8(computeIndexValue(TheCU, Entity).toBits());
+        dwarf::PubIndexEntryDescriptor Desc = computeIndexValue(TheCU, Entity);
+        Asm->OutStreamer.AddComment(
+            "Kind: " + dwarf::GDBIndexEntryKindString(Desc.Kind) + ", " +
+            dwarf::GDBIndexEntryLinkageString(Desc.Static));
+        Asm->EmitInt8(Desc.toBits());
       }
 
       if (Asm->isVerbose())
@@ -2460,8 +2463,11 @@
       Asm->EmitInt32(Entity->getOffset());
 
       if (GnuStyle) {
-        Asm->OutStreamer.AddComment("Index value");
-        Asm->EmitInt8(computeIndexValue(TheCU, Entity).toBits());
+        dwarf::PubIndexEntryDescriptor Desc = computeIndexValue(TheCU, Entity);
+        Asm->OutStreamer.AddComment(
+            "Kind: " + dwarf::GDBIndexEntryKindString(Desc.Kind) + ", " +
+            dwarf::GDBIndexEntryLinkageString(Desc.Static));
+        Asm->EmitInt8(Desc.toBits());
       }
 
       if (Asm->isVerbose())