[PATCH] D44560: [DWARF] Rework debug line parsing to use llvm::Error and callbacks

David Blaikie via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 19 14:54:21 PDT 2018


On Mon, Mar 19, 2018 at 2:52 PM Rafael Avila de Espindola via Phabricator <
reviews at reviews.llvm.org> wrote:

> espindola added a comment.
>
> One thing that I am probably missing is why we need this much.
>
> 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.
>
> My guess is that something like lldb would be similar, read the line table
> and print a message if it failed.
>
> For both cases a simple Expected<> should be sufficient, no?
>

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.


>
>
>
> ================
> Comment at: include/llvm/DebugInfo/DWARF/DWARFDebugLine.h:301
>                            uint64_t Address) const;
> -    Optional<StringRef> getSourceByIndex(uint64_t FileIndex,
> -
>  DILineInfoSpecifier::FileLineInfoKind Kind) const;
> +    Optional<StringRef>
> +    getSourceByIndex(uint64_t FileIndex,
> ----------------
> Why reformat this?
>
>
> Repository:
>   rL LLVM
>
> https://reviews.llvm.org/D44560
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180319/10f67933/attachment.html>


More information about the llvm-commits mailing list