[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 05:56:03 PDT 2017


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