[LLVMdev] DIBuilder - what's with the null compile units?

Devang Patel dpatel at apple.com
Fri Sep 23 13:02:07 PDT 2011


On Sep 23, 2011, at 12:39 PM, Talin wrote:

> Sometime about two months ago, something changed in LLVM that broke my frontend's ability to generate debug info. This was around the time that the requirement to call DIBuilder::finalize() was added (and yes, I am calling it.) Specifically, what I am seeing is an assertion failure in llc because it can't find the compile unit for a subroutine.
> 
> I took a look at the code in DIBuilder.cpp, and I see that indeed it is setting the compile unit to null for all of the various descriptors being created. I assume that the intent is that these references would be filled in later - but apparently this is not happening in my case.

They are not needed any more. During DIBuilder::finalize() the CompileUnit itself collects all required info, which is good enough for CodeGen DwarfWriter. The reason we inverted this graph is because it lets llvm linker unify mdnodes during LTO. 

> Any idea what could be wrong?
> 
> -- 
> -- Talin
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev




More information about the llvm-dev mailing list