<div dir="ltr"><div class="gmail_default" style="font-family:georgia,serif;font-size:large">Hello, Duncan<br><br></div><div class="gmail_default" style="font-family:georgia,serif;font-size:large">Thanks for the help。<br><br></div><div class="gmail_default" style="font-family:georgia,serif;font-size:large">I've double checked my code and I did call finalize(), and it worked for llvm 3.3, but failed on 3.6. Is there any other possibility that can lead to this error ?<br><br></div><div class="gmail_default" style="font-family:georgia,serif;font-size:large">Thanks<br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jun 2, 2015 at 4:29 PM, Duncan P. N. Exon Smith <span dir="ltr"><<a href="mailto:dexonsmith@apple.com" target="_blank">dexonsmith@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""><br>
> On 2015-Jun-02, at 11:14, Hui Zhang <<a href="mailto:wayne.huizhang@gmail.com">wayne.huizhang@gmail.com</a>> wrote:<br>
><br>
> Any ideas ?<br>
><br>
> Thanks<br>
><br>
> On Tue, Jun 2, 2015 at 12:40 PM, Hui Zhang <<a href="mailto:wayne.huizhang@gmail.com">wayne.huizhang@gmail.com</a>> wrote:<br>
> Hello,<br>
><br>
> I'm having this assertion fail when I was using DIBuilder to create the debug information:<br>
><br>
> Expected no forward declarations!<br>
> !719<br>
><br>
> The assertion condition is: !isa<MDNodeFwdDecl> (MD)<br>
><br>
> So My questions are:<br>
> 1. What is exactly the MDNodeFwdDecl ? I saw it's in the latest release 3.6.1, but I also found this link <a href="http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20150119/253730.html" target="_blank">http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20150119/253730.html</a><br>
> saying that MDNodeFwdDecl has been removed, and neither can I find class reference of it on the llvm doxgen website. So is it still valid ??<br>
><br>
> 2. How and when will it be generated when I use DIBuilder module ?<br>
<br>
</span>I suspect you've neglected to call `DIBuilder::finalize()`.<br>
<br>
On trunk, `isa<MDNodeFwdDecl>(N)` has become `N.isTemporary()`.  There<br>
are a number of temporaries created in the debug info graph to facilitate<br>
building cycles, and `DIBuilder::finalize()` (1) cleans them up, and (2)<br>
resolves other nodes involved in the cycles.<br>
<br>
It looks like we don't archive old doxygen files, but you should be<br>
able to build it yourself for old versions.<br>
</blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature">Best regards<br><br><br>Hui Zhang<br></div>
</div>