<div dir="ltr">I'm renaming the function name. <a href="http://reviews.llvm.org/D16162">http://reviews.llvm.org/D16162</a></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jan 13, 2016 at 5:02 PM, Rafael Espíndola <span dir="ltr"><<a href="mailto:rafael.espindola@gmail.com" target="_blank">rafael.espindola@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Maybe just call RoundUpToAlignment directly everywhere?<br>
<br>
Cheers,<br>
Rafael<br>
<br>
<br>
On 6 January 2016 at 18:34, Rui Ueyama via llvm-commits<br>
<div class="HOEnZb"><div class="h5"><<a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a>> wrote:<br>
> Author: ruiu<br>
> Date: Wed Jan 6 17:34:12 2016<br>
> New Revision: 256995<br>
><br>
> URL: <a href="http://llvm.org/viewvc/llvm-project?rev=256995&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project?rev=256995&view=rev</a><br>
> Log:<br>
> Use RoundUpToAlignment instead of writing the expression to round up.<br>
><br>
> The original code might be more readable than the new one if you<br>
> remember the expression. Otherwise the new one is probably better.<br>
><br>
> Modified:<br>
> lld/trunk/ELF/OutputSections.h<br>
><br>
> Modified: lld/trunk/ELF/OutputSections.h<br>
> URL: <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/OutputSections.h?rev=256995&r1=256994&r2=256995&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/OutputSections.h?rev=256995&r1=256994&r2=256995&view=diff</a><br>
> ==============================================================================<br>
> --- lld/trunk/ELF/OutputSections.h (original)<br>
> +++ lld/trunk/ELF/OutputSections.h Wed Jan 6 17:34:12 2016<br>
> @@ -433,7 +433,7 @@ private:<br>
> };<br>
><br>
> inline uint64_t align(uint64_t Value, uint64_t Align) {<br>
> - return (Value + Align - 1) & ~(Align - 1);<br>
> + return llvm::RoundUpToAlignment(Value, Align);<br>
> }<br>
><br>
> // All output sections that are hadnled by the linker specially are<br>
><br>
><br>
> _______________________________________________<br>
> llvm-commits mailing list<br>
> <a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a><br>
> <a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br>
</div></div></blockquote></div><br></div>