[llvm] r325838 - Fix llvm-pdbutil to handle new built-in types

Adrian McCarthy via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 22 15:16:56 PST 2018


Author: amccarth
Date: Thu Feb 22 15:16:56 2018
New Revision: 325838

URL: http://llvm.org/viewvc/llvm-project?rev=325838&view=rev
Log:
Fix llvm-pdbutil to handle new built-in types

Summary:
The built-in PDB types enum has been extended to include char16_t and char32_t.
llvm-pdbutil was hitting an llvm_unreachable because it didn't know about these
new values.  The new values are not yet in the DIA documentation, but are
listed in the cvconst.h header that comes as part of the DIA SDK.

Reviewers: asmith, zturner, rnk

Subscribers: stella.stamenova, llvm-commits, sanjoy

Differential Revision: https://reviews.llvm.org/D43646

Modified:
    llvm/trunk/include/llvm/DebugInfo/PDB/PDBTypes.h
    llvm/trunk/tools/llvm-pdbutil/PrettyBuiltinDumper.cpp

Modified: llvm/trunk/include/llvm/DebugInfo/PDB/PDBTypes.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/PDB/PDBTypes.h?rev=325838&r1=325837&r2=325838&view=diff
==============================================================================
--- llvm/trunk/include/llvm/DebugInfo/PDB/PDBTypes.h (original)
+++ llvm/trunk/include/llvm/DebugInfo/PDB/PDBTypes.h Thu Feb 22 15:16:56 2018
@@ -244,7 +244,9 @@ enum class PDB_BuiltinType {
   Complex = 28,
   Bitfield = 29,
   BSTR = 30,
-  HResult = 31
+  HResult = 31,
+  Char16 = 32,
+  Char32 = 33
 };
 
 /// These values correspond to the flags that can be combined to control the

Modified: llvm/trunk/tools/llvm-pdbutil/PrettyBuiltinDumper.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-pdbutil/PrettyBuiltinDumper.cpp?rev=325838&r1=325837&r2=325838&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-pdbutil/PrettyBuiltinDumper.cpp (original)
+++ llvm/trunk/tools/llvm-pdbutil/PrettyBuiltinDumper.cpp Thu Feb 22 15:16:56 2018
@@ -87,6 +87,10 @@ StringRef BuiltinDumper::getTypeName(con
     return "HRESULT";
   case PDB_BuiltinType::BCD:
     return "HRESULT";
+  case PDB_BuiltinType::Char16:
+    return "char16_t";
+  case PDB_BuiltinType::Char32:
+    return "char32_t";
   case PDB_BuiltinType::None:
     return "...";
   }




More information about the llvm-commits mailing list