Skip to content

Commit bfc965c

Browse files
committed
[Profile] Removed incorrect check introduced by cf2cf19.
There may be some padding before or after counters.
1 parent c70dab0 commit bfc965c

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

compiler-rt/lib/profile/InstrProfilingMerge.c

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -49,14 +49,10 @@ int __llvm_profile_check_compatibility(const char *ProfileData,
4949
uint64_t ProfileSize) {
5050
__llvm_profile_header *Header = (__llvm_profile_header *)ProfileData;
5151
__llvm_profile_data *SrcDataStart, *SrcDataEnd, *SrcData, *DstData;
52-
char *SrcCountersStart, *SrcCountersEnd;
5352
SrcDataStart =
5453
(__llvm_profile_data *)(ProfileData + sizeof(__llvm_profile_header) +
5554
Header->BinaryIdsSize);
5655
SrcDataEnd = SrcDataStart + Header->DataSize;
57-
SrcCountersStart = (char *)SrcDataEnd;
58-
SrcCountersEnd = SrcCountersStart +
59-
Header->CountersSize * __llvm_profile_counter_entry_size();
6056

6157
if (ProfileSize < sizeof(__llvm_profile_header))
6258
return 1;
@@ -75,11 +71,6 @@ int __llvm_profile_check_compatibility(const char *ProfileData,
7571
Header->ValueKindLast != IPVK_Last)
7672
return 1;
7773

78-
if (SrcCountersEnd - SrcCountersStart !=
79-
__llvm_profile_end_counters() - __llvm_profile_begin_counters()) {
80-
return 1;
81-
}
82-
8374
if (ProfileSize <
8475
sizeof(__llvm_profile_header) + Header->BinaryIdsSize +
8576
Header->DataSize * sizeof(__llvm_profile_data) + Header->NamesSize +

0 commit comments

Comments
 (0)