summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdrian McCarthy <amccarth@google.com>2018-02-22 23:16:56 +0000
committerAdrian McCarthy <amccarth@google.com>2018-02-22 23:16:56 +0000
commit4b1a89fa928bb78955d86bb40e94872d367b2de1 (patch)
treeffac20020a9cf52ece7b7f431516ef7de8944d94
parent675dcf02a82a2849962bcbc4d55dd183a661ccdf (diff)
downloadbcm5719-llvm-4b1a89fa928bb78955d86bb40e94872d367b2de1.tar.gz
bcm5719-llvm-4b1a89fa928bb78955d86bb40e94872d367b2de1.zip
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 llvm-svn: 325838
-rw-r--r--llvm/include/llvm/DebugInfo/PDB/PDBTypes.h4
-rw-r--r--llvm/tools/llvm-pdbutil/PrettyBuiltinDumper.cpp4
2 files changed, 7 insertions, 1 deletions
diff --git a/llvm/include/llvm/DebugInfo/PDB/PDBTypes.h b/llvm/include/llvm/DebugInfo/PDB/PDBTypes.h
index a6c6da37d1c..15b01d9e313 100644
--- a/llvm/include/llvm/DebugInfo/PDB/PDBTypes.h
+++ b/llvm/include/llvm/DebugInfo/PDB/PDBTypes.h
@@ -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
diff --git a/llvm/tools/llvm-pdbutil/PrettyBuiltinDumper.cpp b/llvm/tools/llvm-pdbutil/PrettyBuiltinDumper.cpp
index 3b1c4db0d18..bcdecca81ae 100644
--- a/llvm/tools/llvm-pdbutil/PrettyBuiltinDumper.cpp
+++ b/llvm/tools/llvm-pdbutil/PrettyBuiltinDumper.cpp
@@ -87,6 +87,10 @@ StringRef BuiltinDumper::getTypeName(const PDBSymbolTypeBuiltin &Symbol) {
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 "...";
}
OpenPOWER on IntegriCloud