[PATCH] D85505: [dwarf2yaml] Change the return type of dumping functions to Error.

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 10 03:23:17 PDT 2020


jhenderson added a comment.

In D85505#2206165 <https://reviews.llvm.org/D85505#2206165>, @Higuoxing wrote:

> In D85505#2206076 <https://reviews.llvm.org/D85505#2206076>, @jhenderson wrote:
>
>> I like that it makes this makes all the `dumpDebug*` functions consistent. However, are there going to actually be changes to all of these functions to make the new error handling path useful?
>
> This change is intended to make `elf2yaml` and `macho2yaml` share the same logic when dumping DWARF sections. If the parser fails, we are able to dump them as raw content sections.
>
> I think not all of the error handling path are useful. For example, the .debug_str section's parser never fails.

Does this mean we could return void for some functions instead of changing their signatures like you are doing? It seems like that would be the right way round for functions that can never fail.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D85505/new/

https://reviews.llvm.org/D85505



More information about the llvm-commits mailing list