Skip to content

Commit

Permalink
Fix llvm-pdbutil to handle new built-in types
Browse files Browse the repository at this point in the history
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
  • Loading branch information
amccarth-google committed Feb 22, 2018
1 parent 675dcf0 commit 4b1a89f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
4 changes: 3 additions & 1 deletion llvm/include/llvm/DebugInfo/PDB/PDBTypes.h
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions llvm/tools/llvm-pdbutil/PrettyBuiltinDumper.cpp
Expand Up @@ -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 "...";
}
Expand Down

0 comments on commit 4b1a89f

Please sign in to comment.