[PATCH] Some code improvements (no functional change)
Artyom Skrobov
Artyom.Skrobov at arm.com
Thu Apr 17 02:49:42 PDT 2014
Thank you Duncan.
> I don't think the code churn of the other include guards is worth it.
> They're private headers that work together as is, and haven't been
> modified since the original commit.
To be fair, regutils.h had been modified once since then (r81114); but is
there any reason not to add the guards?
> When the function is local to a file, SwapValue() is clear enough, but
> once it's API: how do the names SwapValue() and SwapByteOrder() match
> up together?
I agree that SwapValue() is not a very good name to begin with.
Would it be reasonable if we name both SwapByteOrder() -- it's difficult to
describe their purpose in any other way -- and make the in-place function
take a pointer, instead of a reference?
That way, it would be more evident from the call site whether the function
operates on the argument or takes a copy.
More information about the llvm-commits
mailing list