Hui Zhang
2015-May-27 13:12 UTC
[LLVMdev] how to fix this "Expected no forward declarations!" assertion fail
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... Any information would be great appreciated, not found any useful posts online yet Thanks a lot ! -- Best regards Hui Zhang -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150527/ca392512/attachment.html>
Hui Zhang
2015-May-27 19:29 UTC
[LLVMdev] how to fix this "Expected no forward declarations!" assertion fail
Did anyone have any experience with this issue before ? I didn't have this issue when I used llvm 3.3 Can anyone shed some light on this ? Thanks On Wed, May 27, 2015 at 9:12 AM, Hui Zhang <wayne.huizhang at gmail.com> 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... > > Any information would be great appreciated, not found any useful posts > online yet > > Thanks a lot ! > > -- > Best regards > > > Hui Zhang >-- Best regards Hui Zhang -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150527/a6913ff4/attachment.html>
John Criswell
2015-May-27 19:37 UTC
[LLVMdev] how to fix this "Expected no forward declarations!" assertion fail
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>
Hui Zhang
2015-May-27 20:28 UTC
[LLVMdev] how to fix this "Expected no forward declarations!" assertion fail
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>
Possibly Parallel Threads
- [LLVMdev] need help on llvm support for Chapel
- [LLVMdev] `Ty && "Trying to add a type that doesn't exist?
- [LLVMdev] `Ty && "Trying to add a type that doesn't exist?
- [LLVMdev] `Ty && "Trying to add a type that doesn't exist?
- [LLVMdev] question about the DIBuilder::createStructType