https://reviews.llvm.org/
D135929 caused a failure in
binary-ids-padding.test in big endian configurations:
https://lab.llvm.org/buildbot/#/builders/231/builds/6709
binary-ids-padding.test writes the profile in little-endian format.
This patch changes the raw profile reader to use getDataEndianness()
instead of llvm::support::endian::system_endianness() to fix the issue.
Error RawInstrProfReader<IntPtrT>::readBinaryIds(
std::vector<llvm::object::BuildID> &BinaryIds) {
return readBinaryIdsInternal(*DataBuffer, BinaryIdsSize, BinaryIdsStart,
- BinaryIds,
- llvm::support::endian::system_endianness());
+ BinaryIds, getDataEndianness());
}
template <class IntPtrT>
Error RawInstrProfReader<IntPtrT>::printBinaryIds(raw_ostream &OS) {
return printBinaryIdsInternal(OS, *DataBuffer, BinaryIdsSize, BinaryIdsStart,
- llvm::support::endian::system_endianness());
+ getDataEndianness());
}
namespace llvm {