<div dir="ltr">Was this already covered by tests/picked up by a buildbot when the regression was introduced?</div><br><div class="gmail_quote"><div dir="ltr">On Fri, Jun 16, 2017 at 5:02 PM Zachary Turner via llvm-commits <<a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: zturner<br>
Date: Fri Jun 16 19:02:24 2017<br>
New Revision: 305617<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=305617&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project?rev=305617&view=rev</a><br>
Log:<br>
Don't crash if a type record can't be found.<br>
<br>
This was a regression introduced in a previous patch.  Adding<br>
back the code that handles this case.<br>
<br>
Modified:<br>
    llvm/trunk/lib/DebugInfo/CodeView/LazyRandomTypeCollection.cpp<br>
<br>
Modified: llvm/trunk/lib/DebugInfo/CodeView/LazyRandomTypeCollection.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/CodeView/LazyRandomTypeCollection.cpp?rev=305617&r1=305616&r2=305617&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/CodeView/LazyRandomTypeCollection.cpp?rev=305617&r1=305616&r2=305617&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/lib/DebugInfo/CodeView/LazyRandomTypeCollection.cpp (original)<br>
+++ llvm/trunk/lib/DebugInfo/CodeView/LazyRandomTypeCollection.cpp Fri Jun 16 19:02:24 2017<br>
@@ -75,6 +75,15 @@ StringRef LazyRandomTypeCollection::getT<br>
   if (Index.isNoneType() || Index.isSimple())<br>
     return TypeIndex::simpleTypeName(Index);<br>
<br>
+  // Try to make sure the type exists.  Even if it doesn't though, it may be<br>
+  // because we're dumping a symbol stream with no corresponding type stream<br>
+  // present, in which case we still want to be able to print <unknown UDT><br>
+  // for the type names.<br>
+  if (auto EC = ensureTypeExists(Index)) {<br>
+    consumeError(std::move(EC));<br>
+    return "<unknown UDT>";<br>
+  }<br>
+<br>
   uint32_t I = Index.toArrayIndex();<br>
   if (I >= TypeNames.size())<br>
     TypeNames.resize(I + 1);<br>
<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br>
</blockquote></div>