[LLVMdev] how to fix this "Expected no forward declarations!" assertion fail

John Criswell jtcriswel at gmail.com
Wed May 27 12:37:33 PDT 2015


On 5/27/15 8:12 AM, Hui Zhang wrote:
> Hello, Everyone
>
> I'm using llvm 3.6 DIBuilder module to build the debug information for 
> Chapel language(the Chapel-llvm front end works fine). When I run the 
> test program, I got these assertions failed:
> !718
> Expected no forward declarations!
> !719
> Expected no forward declarations!
> !720
> Expected no forward declarations!
> !721
> Expected no forward declarations!
> !722
> All nodes should be resolved!
> !716
>
> How should I debug it since the bitcode file isn't generated and I 
> can't see what exactly those MDNodes represent...

You can probably disable the pass that verifies the LLVM bitcode. If 
you're using opt, there's a command-line option for that (use 
--help-hidden to find it).  If you're using a custom tool, you'll either 
need to find the option or modify its source code to disable it.

Alternatively, run the program through a debugger so that you break into 
the debugger when it hits the assertion.  You can then use the debugger 
to examine the IR (using the dump() methods of various LLVM classes) and 
see what is causing the problem.

Regards,

John Criswell

>
> Any information would be great appreciated, not found any useful posts 
> online  yet
>
> Thanks a lot !
>
> -- 
> Best regards
>
>
> Hui Zhang
>
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev


-- 
John Criswell
Assistant Professor
Department of Computer Science, University of Rochester
http://www.cs.rochester.edu/u/criswell

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150527/e16f892c/attachment.html>


More information about the llvm-dev mailing list