[PATCH] D40962: [ELF] When a relocation is out of range print the value and the range

Rafael Avila de Espindola via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 7 10:20:21 PST 2017


Alexander Richardson via Phabricator via llvm-commits
<llvm-commits at lists.llvm.org> writes:
> +
>  template <unsigned N>
>  static void checkInt(uint8_t *Loc, int64_t V, RelType Type) {
>    if (!llvm::isInt<N>(V))
> -    error(getErrorLocation(Loc) + "relocation " + lld::toString(Type) +
> -          " out of range");
> +    relocationRangeError(Loc, Type, Twine(V), llvm::minIntN(N),
> +                         llvm::maxUIntN(N - 1));

Why not maxIntN(N)?

Cheers,
Rafael


More information about the llvm-commits mailing list