[llvm] 1ec0214 - [instrprof] Fix issue in binary-ids-padding.test

Gulfem Savrun Yeniceri via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 29 13:49:29 PST 2022


Author: Gulfem Savrun Yeniceri
Date: 2022-12-29T21:48:26Z
New Revision: 1ec021467da65c06cd4aa24ce81898b0759bd16b

URL: https://github.com/llvm/llvm-project/commit/1ec021467da65c06cd4aa24ce81898b0759bd16b
DIFF: https://github.com/llvm/llvm-project/commit/1ec021467da65c06cd4aa24ce81898b0759bd16b.diff

LOG: [instrprof] Fix issue in binary-ids-padding.test

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.

Added: 
    

Modified: 
    llvm/lib/ProfileData/InstrProfReader.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/ProfileData/InstrProfReader.cpp b/llvm/lib/ProfileData/InstrProfReader.cpp
index 4dfc3bab932db..d0714c9b46655 100644
--- a/llvm/lib/ProfileData/InstrProfReader.cpp
+++ b/llvm/lib/ProfileData/InstrProfReader.cpp
@@ -662,14 +662,13 @@ template <class IntPtrT>
 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 {


        


More information about the llvm-commits mailing list