From c30952592a88b6ca7b260d3938be564c8aeea1e4 Mon Sep 17 00:00:00 2001 From: Andrew Rogers Date: Tue, 10 Jun 2025 10:45:21 -0700 Subject: [PATCH] [compiler-rt] replicate changes from llvm/ProfileData/InstrProfData.inc (#143574) ## Purpose The compiler-rt project `check-same-common-code.test` test case started failing after #142861 was merged. This change addresses the failure. ## Overview This patch replicates the changes made by #142861 to llvm/include/llvm/ProfileData/InstrProfData.inc in the duplicated file compiler-rt/include/profile/InstrProfData.inc. These files otherwise match. ## Validation Locally built `check-profile` target and verified `check-same-common-code.test` now passes. --- compiler-rt/include/profile/InstrProfData.inc | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/compiler-rt/include/profile/InstrProfData.inc b/compiler-rt/include/profile/InstrProfData.inc index 6d18680f8916..0496f240dc82 100644 --- a/compiler-rt/include/profile/InstrProfData.inc +++ b/compiler-rt/include/profile/InstrProfData.inc @@ -405,14 +405,14 @@ typedef struct ValueProfRecord { /*! * Read data from this record and save it to Record. */ - void deserializeTo(InstrProfRecord &Record, + LLVM_ABI void deserializeTo(InstrProfRecord &Record, InstrProfSymtab *SymTab); /* * In-place byte swap: * Do byte swap for this instance. \c Old is the original order before * the swap, and \c New is the New byte order. */ - void swapBytes(llvm::endianness Old, llvm::endianness New); + LLVM_ABI void swapBytes(llvm::endianness Old, llvm::endianness New); #endif } ValueProfRecord; @@ -449,41 +449,41 @@ typedef struct ValueProfData { * Return the total size in bytes of the on-disk value profile data * given the data stored in Record. */ - static uint32_t getSize(const InstrProfRecord &Record); + LLVM_ABI static uint32_t getSize(const InstrProfRecord &Record); /*! * Return a pointer to \c ValueProfData instance ready to be streamed. */ - static std::unique_ptr + LLVM_ABI static std::unique_ptr serializeFrom(const InstrProfRecord &Record); /*! * Check the integrity of the record. */ - Error checkIntegrity(); + LLVM_ABI Error checkIntegrity(); /*! * Return a pointer to \c ValueProfileData instance ready to be read. * All data in the instance are properly byte swapped. The input * data is assumed to be in little endian order. */ - static Expected> + LLVM_ABI static Expected> getValueProfData(const unsigned char *SrcBuffer, const unsigned char *const SrcBufferEnd, llvm::endianness SrcDataEndianness); /*! * Swap byte order from \c Endianness order to host byte order. */ - void swapBytesToHost(llvm::endianness Endianness); + LLVM_ABI void swapBytesToHost(llvm::endianness Endianness); /*! * Swap byte order from host byte order to \c Endianness order. */ - void swapBytesFromHost(llvm::endianness Endianness); + LLVM_ABI void swapBytesFromHost(llvm::endianness Endianness); /*! * Return the total size of \c ValueProfileData. */ - uint32_t getSize() const { return TotalSize; } + LLVM_ABI uint32_t getSize() const { return TotalSize; } /*! * Read data from this data and save it to \c Record. */ - void deserializeTo(InstrProfRecord &Record, + LLVM_ABI void deserializeTo(InstrProfRecord &Record, InstrProfSymtab *SymTab); void operator delete(void *ptr) { ::operator delete(ptr); } #endif