[LLVMdev] how to fix this "Expected no forward declarations!" assertion fail
Hui Zhang
wayne.huizhang at gmail.com
Wed May 27 13:28:58 PDT 2015
Hello, John
On Wed, May 27, 2015 at 3:37 PM, John Criswell <jtcriswel at gmail.com> wrote:
> 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 f
>
> ind the option or modify its source code to disable it.
>
Here, "ind the option or modify its source code to disable it", you mean
change the source code of the custom tool(I'm not using opt) that trigger
this assertion failure ? The part of code that cause the failure is below:
#if HAVE_LLVM_VER >= 35
problems = verifyModule(*info->module, &errs());
#else
problems = verifyModule(*info->module, PrintMessageAction);
#endif
if(problems) {
INT_FATAL("LLVM module verification failed");
So you think I should just remove that "verifyModule" line ?
>
> 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.
>
I started it in gdb, but how to use dump() in gdb ?
Thanks
> 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 listLLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.eduhttp://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>
>
>
> --
> John Criswell
> Assistant Professor
> Department of Computer Science, University of Rochesterhttp://www.cs.rochester.edu/u/criswell
>
>
--
Best regards
Hui Zhang
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150527/1b4b4b5c/attachment.html>
More information about the llvm-dev
mailing list