[PATCH] Some code improvements (no functional change)

Chandler Carruth chandlerc at google.com
Thu Jun 12 08:54:40 PDT 2014

On Thu, Jun 12, 2014 at 4:46 PM, Duncan P. N. Exon Smith <
dexonsmith at apple.com> wrote:

> > On 2014 Jun 12, at 08:42, Chandler Carruth <chandlerc at google.com> wrote:
> >
> > I'm lacking context sadly. =/
> Idea is:
>   - SwapByteOrder takes args by value and returns swapped bytes.
>   - Some users want to swap in place.
>   - So, rename SwapByteOrder => getSwappedBytes.
>   - Then, add swapByteOrder (which takes and modifies a reference).

Anyways, to directly answer: this sounds reasonable to me, and if you're
touching the code I would go ahead and fix the naming convention. The only
time I really agree with touching code and preserving the old naming
convention is when there is some huge interface convention that would
suddenly become inconsistent. The canonical example is IRBuilder.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140612/c8062517/attachment.html>

More information about the llvm-commits mailing list