[PATCH] D39272: llvm-readobj: Add support for reading relocations in the Android packed format.
Peter Collingbourne via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 24 19:56:01 PDT 2017
pcc added inline comments.
================
Comment at: llvm/lib/Object/ELF.cpp:492
+ const char *ErrStr = nullptr;
+ auto ReadSLEB = [&]() -> int64_t {
+ if (ErrStr)
----------------
ruiu wrote:
> nit: I believe you can omit ()
Looks like the parens are required if the lambda has a trailing return type.
================
Comment at: llvm/lib/Object/ELF.cpp:527
+ if (GroupedByAddend && GroupHasAddend)
+ Addend += ReadSLEB();
+
----------------
ruiu wrote:
> Can this RHS expression return a negative value? If not, Addend is a monotonically increasing, which is odd.
Yes it can, same applies to Offset. That reminds me that I should add tests for negative addends and offsets, which I've now done.
https://reviews.llvm.org/D39272
More information about the llvm-commits
mailing list