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

Rafael EspĂ­ndola via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 31 13:54:41 PDT 2017


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
>
>


More information about the llvm-commits mailing list