[lld] [llvm] [Object] Define ELFType::Endian as alias for TargetEndianness (PR #86604)

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 26 09:51:59 PDT 2024


MaskRay wrote:

> I know the aim is to shorten the name, but if I'm not mistaken, the term should be "Endianness". I'm pretty sure I've never seen the term "Endian" used outside the context of "big-endian" or "little-endian".

Thanks for the comment. I see that "endian" is used as an adjective. However, it seems used widely, e.g. the system header file `endian.h`. There are other cases a phrase that is not noun is used as variable names, e.g. `old`/`previous`/`next`, or `Is64Bits`. Do I have any chance to get the shorter `Endian` instead of `Endianness`? :)

> Also, if you want to shorten the name, why create a separate alias, rather than just renaming the original term?

There are quite a few uses of `TargetEndianness`. While my long term goal is indeed to remove them, I plan to keep it here so that potential users will more time for migration.



https://github.com/llvm/llvm-project/pull/86604


More information about the llvm-commits mailing list