<div dir="ltr"><br><br><div class="gmail_quote"><div dir="ltr">On Mon, Mar 19, 2018 at 2:52 PM Rafael Avila de Espindola via Phabricator <<a href="mailto:reviews@reviews.llvm.org">reviews@reviews.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">espindola added a comment.<br>
<br>
One thing that I am probably missing is why we need this much.<br>
<br>
On the lld side we only read this section when there is an error, and if reading it fails we just want to print the extra info to the user.<br>
<br>
My guess is that something like lldb would be similar, read the line table and print a message if it failed.<br>
<br>
For both cases a simple Expected<> should be sufficient, no?<br></blockquote><div><br>Mostly probably for things like llvm-dwarfdump that are likely to want to provide more info to the user than to halt at the first error - to aid in debugging/investigation.<br> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
<br>
<br>
================<br>
Comment at: include/llvm/DebugInfo/DWARF/DWARFDebugLine.h:301<br>
                           uint64_t Address) const;<br>
-    Optional<StringRef> getSourceByIndex(uint64_t FileIndex,<br>
-                                         DILineInfoSpecifier::FileLineInfoKind Kind) const;<br>
+    Optional<StringRef><br>
+    getSourceByIndex(uint64_t FileIndex,<br>
----------------<br>
Why reformat this?<br>
<br>
<br>
Repository:<br>
  rL LLVM<br>
<br>
<a href="https://reviews.llvm.org/D44560" rel="noreferrer" target="_blank">https://reviews.llvm.org/D44560</a><br>
<br>
<br>
<br>
</blockquote></div></div>