[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 15:47:39 PST 2009
On Jan 26, 2009, at 3:34 PM, Evan Cheng wrote:
>
> On Jan 26, 2009, at 1:57 PM, Devang Patel wrote:
>
>>
>>
>> Why not use SourceLineInfo directly instead of introducing
>> DebugLocTuple ?
>>
>> //
>> =
>> =
>> =
>> ----------------------------------------------------------------------=
>> ==//
>> /// SourceLineInfo - This class is used to record source line
>> correspondence.
>> ///
>> class SourceLineInfo {
>> unsigned Line; // Source line number.
>> unsigned Column; // Source column.
>> unsigned SourceID; // Source ID number.
>> unsigned LabelID; // Label in code ID number.
>> public
>> ...
>>
>> SourceLineInfo is managed using UniqueVector in DwarfWriter. Is
>> there a known reason to use DenseMap ? I'm just curious.
>
>
> Is there a way to look up the id given line, column, sourceid? It
> looks like DwarfWrite is just keeping a list of source lines so it
> can be dumped out at the end.
It does not need to query, so no it does not have a way to look up the
id given line, column, sourceid. It has a way to look up sourceid
based on file name and directory, which can be reused.
> There are obvious duplicates we need to get rid.
Now, SourceLineInfo is nearly identical to newly added DebugLocTuple.
> 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.
-
Devang
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20090126/b745caba/attachment.html>
More information about the llvm-commits
mailing list