[llvm-commits] DebugInfoBuilder - rough sketch

Talin viridia at gmail.com
Mon Jun 9 19:06:40 PDT 2008


I've attached a patch file for the DebugInfoBuilder class. This is a 
working prototype, meant for criticism and comment, and is not intended 
as an actual patch for submission. The interface is incomplete and there 
are no unit tests as of yet.

The DebugInfoBuilder class is a utility class for creating source level 
debugging descriptors. It is inspired by IRBuilder.

Some of the unresolved issues include:

1) The current design allows the instance of the DebugInfoBuilder to be 
reused with multiple modules. Calling SetModule() will set the current 
module context, and install the basic anchors if they are not already 
present.

The reason why it was done this way was to make the usage of the class 
similar to the way IRBuilder is used. However, a somewhat simpler design 
would be a "use-once" instance, that took the module reference as a 
constructor parameter.

2) The .cpp file contains a cut & pasted definition of LLVMDebugVersion. 
Obviously, this should be included from a header; The reason for the 
clone is to avoid creating a dependency on the CodeGen lib. I recommend 
that the definition of LLVMDebugVersion be moved out of 
MachineModuleInfo and into some more globally accessible header file.

-- Talin
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: debuginfobuilder.patch
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20080609/bf8d28b8/attachment.ksh>


More information about the llvm-commits mailing list