Skip to content

Commit c309525

Browse files
authored
[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.
1 parent 47918e7 commit c309525

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

compiler-rt/include/profile/InstrProfData.inc

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -405,14 +405,14 @@ typedef struct ValueProfRecord {
405405
/*!
406406
* Read data from this record and save it to Record.
407407
*/
408-
void deserializeTo(InstrProfRecord &Record,
408+
LLVM_ABI void deserializeTo(InstrProfRecord &Record,
409409
InstrProfSymtab *SymTab);
410410
/*
411411
* In-place byte swap:
412412
* Do byte swap for this instance. \c Old is the original order before
413413
* the swap, and \c New is the New byte order.
414414
*/
415-
void swapBytes(llvm::endianness Old, llvm::endianness New);
415+
LLVM_ABI void swapBytes(llvm::endianness Old, llvm::endianness New);
416416
#endif
417417
} ValueProfRecord;
418418

@@ -449,41 +449,41 @@ typedef struct ValueProfData {
449449
* Return the total size in bytes of the on-disk value profile data
450450
* given the data stored in Record.
451451
*/
452-
static uint32_t getSize(const InstrProfRecord &Record);
452+
LLVM_ABI static uint32_t getSize(const InstrProfRecord &Record);
453453
/*!
454454
* Return a pointer to \c ValueProfData instance ready to be streamed.
455455
*/
456-
static std::unique_ptr<ValueProfData>
456+
LLVM_ABI static std::unique_ptr<ValueProfData>
457457
serializeFrom(const InstrProfRecord &Record);
458458
/*!
459459
* Check the integrity of the record.
460460
*/
461-
Error checkIntegrity();
461+
LLVM_ABI Error checkIntegrity();
462462
/*!
463463
* Return a pointer to \c ValueProfileData instance ready to be read.
464464
* All data in the instance are properly byte swapped. The input
465465
* data is assumed to be in little endian order.
466466
*/
467-
static Expected<std::unique_ptr<ValueProfData>>
467+
LLVM_ABI static Expected<std::unique_ptr<ValueProfData>>
468468
getValueProfData(const unsigned char *SrcBuffer,
469469
const unsigned char *const SrcBufferEnd,
470470
llvm::endianness SrcDataEndianness);
471471
/*!
472472
* Swap byte order from \c Endianness order to host byte order.
473473
*/
474-
void swapBytesToHost(llvm::endianness Endianness);
474+
LLVM_ABI void swapBytesToHost(llvm::endianness Endianness);
475475
/*!
476476
* Swap byte order from host byte order to \c Endianness order.
477477
*/
478-
void swapBytesFromHost(llvm::endianness Endianness);
478+
LLVM_ABI void swapBytesFromHost(llvm::endianness Endianness);
479479
/*!
480480
* Return the total size of \c ValueProfileData.
481481
*/
482-
uint32_t getSize() const { return TotalSize; }
482+
LLVM_ABI uint32_t getSize() const { return TotalSize; }
483483
/*!
484484
* Read data from this data and save it to \c Record.
485485
*/
486-
void deserializeTo(InstrProfRecord &Record,
486+
LLVM_ABI void deserializeTo(InstrProfRecord &Record,
487487
InstrProfSymtab *SymTab);
488488
void operator delete(void *ptr) { ::operator delete(ptr); }
489489
#endif

0 commit comments

Comments
 (0)