[lld] r299115 - Include filenames in error messages to report broken files.

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 31 17:08:31 PDT 2017


If D31546 is neutral to you, I'll submit that change as I sort of like it.
It uses common toString() instead of some member variable, so it feels more
readable than it currently is.

On Fri, Mar 31, 2017 at 1:54 PM, Rafael EspĂ­ndola <
rafael.espindola at gmail.com> wrote:

> I don't see the advantage. It still has two variable and ore more
> member variable than what is needed.
>
> It is not a big deal and something we can try to refactor later on.
>
> Cheers,
> Rafael
>
> On 31 March 2017 at 15:19, Rui Ueyama <ruiu at google.com> wrote:
> > Okay. How about this one. https://reviews.llvm.org/D31546
> >
> > On Fri, Mar 31, 2017 at 5:56 AM, Rafael EspĂ­ndola
> > <rafael.espindola at gmail.com> wrote:
> >>
> >> On 30 March 2017 at 18:56, Rui Ueyama <ruiu at google.com> wrote:
> >> > I tried a few different ideas. First, I tried to pass an InputFile to
> >> > check() as you suggested, but that ended up having four functions,
> which
> >> > looked ugly
> >> >
> >> >   template <class T> T check(ErrorOr<T> E, const Twine &Prefix);
> >> >   template <class T> T check(Expected<T> E, const Twine &Prefix);
> >> >   template <class T> T check(ErrorOr<T> E, InputFile *File);
> >> >   template <class T> T check(Expected<T> E, InputFile *File);
> >>
> >> I would still prefer this as it makes it impossible to get the two
> >> variables out of sync (and avoids a member variable).
> >>
> >> Cheers,
> >> Rafael
> >
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170331/94c18972/attachment.html>


More information about the llvm-commits mailing list