[CodeView] Emit an appropriate symbol kind for globals

We emitted debug info for globals/functions as if they all had external
linkage.  Instead, emit local symbol records when appropriate.

llvm-svn: 274676
diff --git a/llvm/lib/DebugInfo/CodeView/SymbolDumper.cpp b/llvm/lib/DebugInfo/CodeView/SymbolDumper.cpp
index 133f9fa..6763c3d 100644
--- a/llvm/lib/DebugInfo/CodeView/SymbolDumper.cpp
+++ b/llvm/lib/DebugInfo/CodeView/SymbolDumper.cpp
@@ -279,6 +279,7 @@
 void CVSymbolDumperImpl::visitDataSym(SymbolKind Kind, DataSym &Data) {
   DictScope S(W, "DataSym");
 
+  W.printEnum("Kind", uint16_t(Kind), getSymbolTypeNames());
   StringRef LinkageName;
   if (ObjDelegate) {
     ObjDelegate->printRelocatedField("DataOffset", Data.getRelocationOffset(),
@@ -552,6 +553,7 @@
   InFunctionScope = true;
 
   StringRef LinkageName;
+  W.printEnum("Kind", uint16_t(Kind), getSymbolTypeNames());
   W.printHex("PtrParent", Proc.Header.PtrParent);
   W.printHex("PtrEnd", Proc.Header.PtrEnd);
   W.printHex("PtrNext", Proc.Header.PtrNext);