[llvm-commits] [llvm] r63008 - in /llvm/trunk: include/llvm/CodeGen/DebugLoc.h include/llvm/CodeGen/MachineFunction.h lib/CodeGen/MachineFunction.cpp

Devang Patel dpatel at apple.com
Mon Jan 26 16:56:10 PST 2009


>>> I don't particularly care the way we use DwarfWriter to track  
>>> debug info. It should be used to print dwarf, not managing debug  
>>> info like it's doing right now.
>>
>> I am not sure I understand here. AFAIU, DwarfWriter's DwarfDebug  
>> does not try to manage debug info.
>
> There are basically 2 parts of debug info (in codegen). There is the  
> actually dwarf writing, which obviously DwarfWriter should do.

(Just to avoid confusion : DwarfDebug info emits debug info.  
DwarfWriter also includes DwarfException which emits EH info.)

> Then there is code that validate debug info (e.g. ValidDebugInfo),

This only validates dbg values at LLVM IR level. Ideally this should  
be part of Verifier. I put it here, for now, to side step circular  
dependencies :)

> track file name to id mapping, map labels, etc. Some of it is in  
> dwarf writer, some in machine module info.

labels are managed by machine module info.

> These probably should go to a separate class. Then we can merge  
> DebugLoc in it. Does that make sense?

id mapping can be moved in to DebugLoc and we can use one struct to  
collect <line,col, sourceid> info, whether you name it as  
SourceLineInfo or DebugLocTuple

-
Devang



More information about the llvm-commits mailing list