search for: valorerr

Displaying 4 results from an estimated 4 matches for "valorerr".

2016 Feb 09
3
[RFC] Error handling in LLVM libraries.
...AllUnhandledErrors(std::move(Err), errs(), "<tool name>"); exit(1); } ... TypedErrorOr<Result> R = doSomething(); check(R.takeError()); ... *R; Side-note: you can actually go one better and replace this idiom with: template <typename T> T check(TypedErrorOr<T> ValOrErr) { if (!ValOrErr) { logAllUnhandledErrors(ValOrErr.takeError(), errs(), "<tool name>"); exit(1); } return std::move(*ValOrErr); } ... Result R = check(doSomething()); ... Mind you, this new idiom works equally well for ErrorOr/std::error_code. > So, could you ach...
2016 Feb 10
5
[RFC] Error handling in LLVM libraries.
...exit at the point where the issue is found. > > We use the above code now because lib/Object has no diagnostic handler. > > > Side-note: you can actually go one better and replace this idiom with: > > > > template <typename T> > > T check(TypedErrorOr<T> ValOrErr) { > > if (!ValOrErr) { > > logAllUnhandledErrors(ValOrErr.takeError(), errs(), "<tool name>"); > > exit(1); > > } > > return std::move(*ValOrErr); > > } > > Yes, we do pretty much that in ELF/COFF lld. > > > > Usin...
2017 Apr 04
3
RFC: Adding a string table to the bitcode format
On Tue, Apr 4, 2017 at 12:36 PM, Duncan P. N. Exon Smith < dexonsmith at apple.com> wrote: > > On 2017-Apr-04, at 12:12, Peter Collingbourne <peter at pcc.me.uk> wrote: > > On Mon, Apr 3, 2017 at 8:13 PM, Mehdi Amini <mehdi.amini at apple.com> wrote: > >> >> On Apr 3, 2017, at 7:08 PM, Peter Collingbourne <peter at pcc.me.uk> wrote: >>
2016 Feb 03
6
[RFC] Error handling in LLVM libraries.
Hi Mehdi, > If you subclass a diagnostic right now, isn’t the RTTI information available to the handler, which can then achieve the same dispatching / custom handling per type of diagnostic? > (I’m not advocating the diagnostic system, which I found less convenient to use than what you are proposing) I have to confess I haven't looked at the diagnostic classes closely. I'll take a