[llvm-commits] Make DebugLoc not depended on DwarfWriter

Argiris Kirtzidis akyrtzi at gmail.com
Thu Apr 30 09:10:29 PDT 2009


Currently DebugLocTuple "depends" on DwarfWriter, in that 
DwarfWriter::getOrCreateSourceID must be called in order to get a Source 
ID to put in the tuple.
The attached patch makes a teenie tiny step towards a direction where 
DwarfWriter plays a less dominant role in debug info:

-DebugLoc do (and the instruction selectors should) not depend on 
DwarfWriter. Source ID is more or less an "implementation detail" of 
DwarfWriter.
-DwarfWriter should become a consumer of debug info (DebugLoc, etc.), 
ideally a MachineFunctionPass.
-Other consumers of debug info, other than DwarfWriter, may be allowed 
(i.e. a JIT debugger).

The attached patch:

-Replaces the Source ID of DebugLocTuple with a GlobalVariable * of the 
compile unit.
-Removes DwarfWriter::getOrCreateSourceID since it isn't needed after 
the above change
-Makes all necessary changes due to the above

Let me know what you think.

-Argiris
-------------- next part --------------
A non-text attachment was scrubbed...
Name: debugloc.patch
Type: text/x-diff
Size: 22187 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20090430/3db7868a/attachment.patch>


More information about the llvm-commits mailing list