[PATCH] D32609: Update llvm-readobj -coff-resources to display tree structure.
Eric Beckmann via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu May 4 14:20:40 PDT 2017
ecbeckmann added inline comments.
================
Comment at: llvm/tools/llvm-readobj/COFFDumper.cpp:1586-1590
+ const coff_resource_dir_entry *Entry;
+ if (EO)
+ Entry = *EO;
+ else
+ error(EO.getError());
----------------
ecbeckmann wrote:
> zturner wrote:
> > Does this work?
> >
> > ```
> > auto &Entry = error(EO);
> > ```
> >
> > I know it does with `Expected<T>`, but not sure about `ErrorOr<T>`.
> Unfortunately error() does not accept type ErrorOr.
I found a function unwrapOrError that does exactly what we want.
https://reviews.llvm.org/D32609
More information about the llvm-commits
mailing list