summaryrefslogtreecommitdiffstats
path: root/llvm/lib/DebugInfo
diff options
context:
space:
mode:
authorZachary Turner <zturner@google.com>2017-05-19 00:56:39 +0000
committerZachary Turner <zturner@google.com>2017-05-19 00:56:39 +0000
commit8f1d87a79abb91cb44292e5cfde350e85a119385 (patch)
tree311cec6807f7e726257965fe432125b1f2cd5b29 /llvm/lib/DebugInfo
parentd6e75ed93ed39e29a6a7e9241ea6cc6171808ae7 (diff)
downloadbcm5719-llvm-8f1d87a79abb91cb44292e5cfde350e85a119385.tar.gz
bcm5719-llvm-8f1d87a79abb91cb44292e5cfde350e85a119385.zip
Fix crasher in CodeView test.
Apparently this was always broken, but previously we were more graceful about it and we would print "unknown udt" if we couldn't find the type index, whereas now we just segfault because we assume it's valid. But this exposed a real bug, which is that we weren't looking in the right place. So fix that, and also fix this crash at the same time. llvm-svn: 303397
Diffstat (limited to 'llvm/lib/DebugInfo')
-rw-r--r--llvm/lib/DebugInfo/CodeView/TypeDumpVisitor.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/DebugInfo/CodeView/TypeDumpVisitor.cpp b/llvm/lib/DebugInfo/CodeView/TypeDumpVisitor.cpp
index 5fb46c5fa39..84f52a05581 100644
--- a/llvm/lib/DebugInfo/CodeView/TypeDumpVisitor.cpp
+++ b/llvm/lib/DebugInfo/CodeView/TypeDumpVisitor.cpp
@@ -242,7 +242,7 @@ Error TypeDumpVisitor::visitKnownRecord(CVType &CVR, StringListRecord &Strs) {
W->printNumber("NumStrings", Size);
ListScope Arguments(*W, "Strings");
for (uint32_t I = 0; I < Size; ++I) {
- printTypeIndex("String", Indices[I]);
+ printItemIndex("String", Indices[I]);
}
return Error::success();
}
OpenPOWER on IntegriCloud