diff options
author | Zachary Turner <zturner@google.com> | 2017-12-15 00:27:49 +0000 |
---|---|---|
committer | Zachary Turner <zturner@google.com> | 2017-12-15 00:27:49 +0000 |
commit | 1764ef1f3a7e3df710e492ab0b53fe50b1273ce1 (patch) | |
tree | 38299f0006c3d26088a33ef8f0edfbbaf3eaefb5 /tools | |
parent | 5334180cf2fafa3564ed803026f8c2ae7f76b0ce (diff) |
Don't crash in llvm-pdbutil when dumping TypeIndexes with high bit set.
This is a special code that indicates that it's a function id.
While I'm still not certain how to interpret these, we definitely
should *not* be using these values as indices into an array directly.
For now, when we encounter one of these, just print the numeric value.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@320775 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools')
-rw-r--r-- | tools/llvm-pdbutil/MinimalSymbolDumper.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/llvm-pdbutil/MinimalSymbolDumper.cpp b/tools/llvm-pdbutil/MinimalSymbolDumper.cpp index 48c71652d9e..40a0e46efd4 100644 --- a/tools/llvm-pdbutil/MinimalSymbolDumper.cpp +++ b/tools/llvm-pdbutil/MinimalSymbolDumper.cpp @@ -337,7 +337,7 @@ Error MinimalSymbolDumper::visitSymbolEnd(CVSymbol &Record) { std::string MinimalSymbolDumper::typeOrIdIndex(codeview::TypeIndex TI, bool IsType) const { - if (TI.isSimple()) + if (TI.isSimple() || TI.isDecoratedItemId()) return formatv("{0}", TI).str(); auto &Container = IsType ? Types : Ids; StringRef Name = Container.getTypeName(TI); |