<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Jan 26, 2009, at 3:34 PM, Evan Cheng wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Jan 26, 2009, at 1:57 PM, Devang Patel wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div><br></div>Why not use SourceLineInfo directly instead of introducing DebugLocTuple ? </div></div></blockquote><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><br></div><div><div>//===----------------------------------------------------------------------===//                 </div><div>/// SourceLineInfo - This class is used to record source line correspondence.                    </div><div>///                                                                                              </div><div>class SourceLineInfo {</div><div>  unsigned Line;                        // Source line number.                                   </div><div>  unsigned Column;                      // Source column.                                        </div><div>  unsigned SourceID;                    // Source ID number.                                     </div><div>  unsigned LabelID;                     // Label in code ID number.                              </div><div>public</div><div>...</div><div><br></div><div>SourceLineInfo is managed using UniqueVector in DwarfWriter. Is there a known reason to use DenseMap ? I'm just curious<span class="Apple-style-span" style="font-family: 'Lucida Grande'; font-size: 13px; white-space: pre; "><span class="Apple-style-span" style="font-family: Verdana; font-size: 11px; white-space: normal; ">. </span></span></div></div></div></blockquote><div><br></div><div><br></div><div>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. </div></div></div></blockquote><div><br></div>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.</div><div><br><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div>There are obvious duplicates we need to get rid. </div></div></div></blockquote><div><br></div><div>Now, SourceLineInfo is nearly identical to newly added DebugLocTuple.</div><br><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div>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.</div></div></div></blockquote><div><br></div>I am not sure I understand here. AFAIU, DwarfWriter's DwarfDebug does not try to manage debug info. </div><div><br></div><div>-</div><div>Devang</div></body></html>