summaryrefslogtreecommitdiffstats
path: root/llvm/tools
diff options
context:
space:
mode:
authorZachary Turner <zturner@google.com>2017-12-15 00:27:49 +0000
committerZachary Turner <zturner@google.com>2017-12-15 00:27:49 +0000
commita1eb9432b1d9a2fa09e1a1dbdcc0296515d7ab84 (patch)
tree5e8b8bf429c9ab16eb8b73db39cfd3947c425b75 /llvm/tools
parentbafe69026d7e78696173bf09e4959996ec750167 (diff)
downloadbcm5719-llvm-a1eb9432b1d9a2fa09e1a1dbdcc0296515d7ab84.tar.gz
bcm5719-llvm-a1eb9432b1d9a2fa09e1a1dbdcc0296515d7ab84.zip
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. llvm-svn: 320775
Diffstat (limited to 'llvm/tools')
-rw-r--r--llvm/tools/llvm-pdbutil/MinimalSymbolDumper.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/tools/llvm-pdbutil/MinimalSymbolDumper.cpp b/llvm/tools/llvm-pdbutil/MinimalSymbolDumper.cpp
index 48c71652d9e..40a0e46efd4 100644
--- a/llvm/tools/llvm-pdbutil/MinimalSymbolDumper.cpp
+++ b/llvm/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);
OpenPOWER on IntegriCloud