<div dir="ltr">This was caused by r202769.</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Mar 4, 2014 at 10:37 AM, Reid Kleckner <span dir="ltr"><<a href="mailto:rnk@google.com" target="_blank">rnk@google.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi dblaikie,<br>
<br>
This fails during a clang-cl self-host on Windows on<br>
MachineLoopInfo.cpp.  I don't understand why.  I assume a recent change<br>
caused it, but I haven't isolated which one.  However, this change by<br>
itself appears correct, since the earlier code uses null checks after<br>
WeakVH loads.<br>
<br>
<a href="http://llvm-reviews.chandlerc.com/D2944" target="_blank">http://llvm-reviews.chandlerc.com/D2944</a><br>
<br>
Files:<br>
  lib/CodeGen/CGDebugInfo.cpp<br>
<br>
Index: lib/CodeGen/CGDebugInfo.cpp<br>
===================================================================<br>
--- lib/CodeGen/CGDebugInfo.cpp<br>
+++ lib/CodeGen/CGDebugInfo.cpp<br>
@@ -3341,7 +3341,8 @@<br>
   // up the final type in the type cache.<br>
   for (std::vector<void *>::const_iterator RI = RetainedTypes.begin(),<br>
          RE = RetainedTypes.end(); RI != RE; ++RI)<br>
-    DBuilder.retainType(llvm::DIType(cast<llvm::MDNode>(TypeCache[*RI])));<br>
+    if (llvm::Value *V = TypeCache[*RI])<br>
+      DBuilder.retainType(llvm::DIType(cast<llvm::MDNode>(V)));<br>
<br>
   DBuilder.finalize();<br>
 }<br>
</blockquote></div><br></div>