[PATCH] D18004: [ELF] - refactor of SymbolBody::compare()
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 10 09:35:07 PST 2016
ruiu accepted this revision.
ruiu added a comment.
This revision is now accepted and ready to land.
LGTM
================
Comment at: ELF/Symbols.cpp:117
@@ +116,3 @@
+ if (A->Size < B->Size) {
+ B->MaxAlignment = std::max(A->MaxAlignment, B->MaxAlignment);
+ return -1;
----------------
grimar wrote:
> rafael wrote:
> > I think you can just say
> >
> > A->MaxAlingment = B->MaxAlignment = std::max(A->MaxAlignment, B->MaxAlignment);
> >
> > before the if.
> Sounds good for me.
Not directly related (so please don't do that in this patch), but I'd rename MaxAlignment to Align. (We can argue of the maximum alignment for a group of symbols, but for each symbol, there is only one alignment.)
http://reviews.llvm.org/D18004
More information about the llvm-commits
mailing list