[lld] r221427 - [ELF] Implement isLittleEndian for all architectures
Shankar Easwaran
shankare at codeaurora.org
Thu Nov 6 10:36:24 PST 2014
On 11/6/2014 11:57 AM, Charlie Turner wrote:
>> We have one in llvm.
> I wonder if it's possible to use an approach similar to that taken by LLVM
> object library.
>
> I'm not familiar with lld, but can you not pick up the endianness from the
> ELFLinkingContext::create(llvm::Triple) factory? You're switching on the
> triple there, so you can detect the endianness for arch's on which that
> matters (see ArchType in Triple.h) instead of replicating the logic in the
> isLittleEndian methods again.
Sure, that can be cleaned up. Thanks for pointing that out. I will give
it a try.
Shankar Easwaran
--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by the Linux Foundation
More information about the llvm-commits
mailing list