From 8f1d87a79abb91cb44292e5cfde350e85a119385 Mon Sep 17 00:00:00 2001 From: Zachary Turner Date: Fri, 19 May 2017 00:56:39 +0000 Subject: 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 --- llvm/lib/DebugInfo/CodeView/TypeDumpVisitor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'llvm/lib') 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(); } -- cgit v1.2.3