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

Alexander Richardson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 11 09:43:09 PST 2017


arichardson added inline comments.


================
Comment at: ELF/Target.h:171
+    // message instead of an extremely large unsigned number
+    reportRangeError(Loc, Type, (int64_t)V < 0 ? Twine((int64_t)V) : Twine(V),
+                     llvm::minIntN(N), llvm::maxUIntN(N));
----------------
ruiu wrote:
> Why don't you just pass Twine((int64_t)V)?
Since we only call this with values <= INT64_MAX that is much better, thanks.


Repository:
  rLLD LLVM Linker

https://reviews.llvm.org/D40962





More information about the llvm-commits mailing list