> On 2015-Jun-02, at 11:14, Hui Zhang <wayne.huizhang at gmail.com> wrote: > > Any ideas ? > > Thanks > > On Tue, Jun 2, 2015 at 12:40 PM, Hui Zhang <wayne.huizhang at gmail.com> wrote: > Hello, > > I'm having this assertion fail when I was using DIBuilder to create the debug information: > > Expected no forward declarations! > !719 > > The assertion condition is: !isa<MDNodeFwdDecl> (MD) > > So My questions are: > 1. What is exactly the MDNodeFwdDecl ? I saw it's in the latest release 3.6.1, but I also found this link http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20150119/253730.html > 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 ?? > > 2. How and when will it be generated when I use DIBuilder module ?I suspect you've neglected to call `DIBuilder::finalize()`. On trunk, `isa<MDNodeFwdDecl>(N)` has become `N.isTemporary()`. There are a number of temporaries created in the debug info graph to facilitate building cycles, and `DIBuilder::finalize()` (1) cleans them up, and (2) resolves other nodes involved in the cycles. It looks like we don't archive old doxygen files, but you should be able to build it yourself for old versions.
Hello, Duncan Thanks for the help。 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 ? Thanks On Tue, Jun 2, 2015 at 4:29 PM, Duncan P. N. Exon Smith < dexonsmith at apple.com> wrote:> > > On 2015-Jun-02, at 11:14, Hui Zhang <wayne.huizhang at gmail.com> wrote: > > > > Any ideas ? > > > > Thanks > > > > On Tue, Jun 2, 2015 at 12:40 PM, Hui Zhang <wayne.huizhang at gmail.com> > wrote: > > Hello, > > > > I'm having this assertion fail when I was using DIBuilder to create the > debug information: > > > > Expected no forward declarations! > > !719 > > > > The assertion condition is: !isa<MDNodeFwdDecl> (MD) > > > > So My questions are: > > 1. What is exactly the MDNodeFwdDecl ? I saw it's in the latest release > 3.6.1, but I also found this link > http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20150119/253730.html > > 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 ?? > > > > 2. How and when will it be generated when I use DIBuilder module ? > > I suspect you've neglected to call `DIBuilder::finalize()`. > > On trunk, `isa<MDNodeFwdDecl>(N)` has become `N.isTemporary()`. There > are a number of temporaries created in the debug info graph to facilitate > building cycles, and `DIBuilder::finalize()` (1) cleans them up, and (2) > resolves other nodes involved in the cycles. > > It looks like we don't archive old doxygen files, but you should be > able to build it yourself for old versions. >-- Best regards Hui Zhang -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150602/03ef3587/attachment.html>
(Wow, 3.3 is old.) I think some of the interfaces in DIBuilder now return a temporary node that didn't before (I wasn't involved in that work, so I don't know if it's from new API, or if the old API changed). Otherwise, I can't think of anything off the top of my head. Let me know what you discover.> On 2015-Jun-02, at 14:07, Hui Zhang <wayne.huizhang at gmail.com> wrote: > > Hello, Duncan > > Thanks for the help。 > > 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 ? > > Thanks > > On Tue, Jun 2, 2015 at 4:29 PM, Duncan P. N. Exon Smith <dexonsmith at apple.com> wrote: > > > On 2015-Jun-02, at 11:14, Hui Zhang <wayne.huizhang at gmail.com> wrote: > > > > Any ideas ? > > > > Thanks > > > > On Tue, Jun 2, 2015 at 12:40 PM, Hui Zhang <wayne.huizhang at gmail.com> wrote: > > Hello, > > > > I'm having this assertion fail when I was using DIBuilder to create the debug information: > > > > Expected no forward declarations! > > !719 > > > > The assertion condition is: !isa<MDNodeFwdDecl> (MD) > > > > So My questions are: > > 1. What is exactly the MDNodeFwdDecl ? I saw it's in the latest release 3.6.1, but I also found this link http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20150119/253730.html > > 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 ?? > > > > 2. How and when will it be generated when I use DIBuilder module ? > > I suspect you've neglected to call `DIBuilder::finalize()`. > > On trunk, `isa<MDNodeFwdDecl>(N)` has become `N.isTemporary()`. There > are a number of temporaries created in the debug info graph to facilitate > building cycles, and `DIBuilder::finalize()` (1) cleans them up, and (2) > resolves other nodes involved in the cycles. > > It looks like we don't archive old doxygen files, but you should be > able to build it yourself for old versions. > > > > -- > Best regards > > > Hui Zhang