[PATCH] Some code improvements (no functional change)
Duncan P. N. Exon Smith
dexonsmith at apple.com
Thu Jun 12 08:35:24 PDT 2014
> On 2014 May 29, at 03:41, Artyom Skrobov <Artyom.Skrobov at arm.com> wrote:
> I'd like to ask your opinion on naming the byte-swapping
> functions swapByteOrder for the in-place variants, and getBytesSwapped for
> the by-value/return variants; what do you think?
> In addition to adhering to the lowercase-initial convention advised in the
> Coding Standards, I believe this would also reflect more clearly what the
> functions are doing, than their current names of SwapValue and
Generally we don't change the names of old functions that don't match the
current style guidelines (there's *a lot* of code that predates the style
guidelines, and this would cause a lot of churn).
Nevertheless, it'd be nice to have in-place variants. I think something
like `SwapByteOrderInPlace()` or `ReplaceByteOrder()` might work with the
naming scheme in the file and minimize code churn.
Anyone else have an opinion on this? Personally, I prefer Artyom's
proposal (renaming `SwapByteOrder`).
More information about the llvm-commits