[lld] r256995 - Use RoundUpToAlignment instead of writing the expression to round up.
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 13 17:03:02 PST 2016
I'm renaming the function name. http://reviews.llvm.org/D16162
On Wed, Jan 13, 2016 at 5:02 PM, Rafael EspĂndola <
rafael.espindola at gmail.com> wrote:
> Maybe just call RoundUpToAlignment directly everywhere?
>
> Cheers,
> Rafael
>
>
> On 6 January 2016 at 18:34, Rui Ueyama via llvm-commits
> <llvm-commits at lists.llvm.org> wrote:
> > Author: ruiu
> > Date: Wed Jan 6 17:34:12 2016
> > New Revision: 256995
> >
> > URL: http://llvm.org/viewvc/llvm-project?rev=256995&view=rev
> > Log:
> > Use RoundUpToAlignment instead of writing the expression to round up.
> >
> > The original code might be more readable than the new one if you
> > remember the expression. Otherwise the new one is probably better.
> >
> > Modified:
> > lld/trunk/ELF/OutputSections.h
> >
> > Modified: lld/trunk/ELF/OutputSections.h
> > URL:
> http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/OutputSections.h?rev=256995&r1=256994&r2=256995&view=diff
> >
> ==============================================================================
> > --- lld/trunk/ELF/OutputSections.h (original)
> > +++ lld/trunk/ELF/OutputSections.h Wed Jan 6 17:34:12 2016
> > @@ -433,7 +433,7 @@ private:
> > };
> >
> > inline uint64_t align(uint64_t Value, uint64_t Align) {
> > - return (Value + Align - 1) & ~(Align - 1);
> > + return llvm::RoundUpToAlignment(Value, Align);
> > }
> >
> > // All output sections that are hadnled by the linker specially are
> >
> >
> > _______________________________________________
> > llvm-commits mailing list
> > llvm-commits at lists.llvm.org
> > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160113/bfe4fe71/attachment.html>
More information about the llvm-commits
mailing list