@@ -52,18 +52,18 @@ int __llvm_profile_check_compatibility(const char *ProfileData,
5252 SrcDataStart =
5353 (__llvm_profile_data * )(ProfileData + sizeof (__llvm_profile_header ) +
5454 Header -> BinaryIdsSize );
55- SrcDataEnd = SrcDataStart + Header -> DataSize ;
55+ SrcDataEnd = SrcDataStart + Header -> NumData ;
5656
5757 if (ProfileSize < sizeof (__llvm_profile_header ))
5858 return 1 ;
5959
6060 /* Check the header first. */
6161 if (Header -> Magic != __llvm_profile_get_magic () ||
6262 Header -> Version != __llvm_profile_get_version () ||
63- Header -> DataSize !=
63+ Header -> NumData !=
6464 __llvm_profile_get_num_data (__llvm_profile_begin_data (),
6565 __llvm_profile_end_data ()) ||
66- Header -> CountersSize !=
66+ Header -> NumCounters !=
6767 __llvm_profile_get_num_counters (__llvm_profile_begin_counters (),
6868 __llvm_profile_end_counters ()) ||
6969 Header -> NamesSize != (uint64_t )(__llvm_profile_end_names () -
@@ -73,8 +73,8 @@ int __llvm_profile_check_compatibility(const char *ProfileData,
7373
7474 if (ProfileSize <
7575 sizeof (__llvm_profile_header ) + Header -> BinaryIdsSize +
76- Header -> DataSize * sizeof (__llvm_profile_data ) + Header -> NamesSize +
77- Header -> CountersSize * __llvm_profile_counter_entry_size ())
76+ Header -> NumData * sizeof (__llvm_profile_data ) + Header -> NamesSize +
77+ Header -> NumCounters * __llvm_profile_counter_entry_size ())
7878 return 1 ;
7979
8080 for (SrcData = SrcDataStart ,
@@ -119,10 +119,10 @@ int __llvm_profile_merge_from_buffer(const char *ProfileData,
119119 SrcDataStart =
120120 (__llvm_profile_data * )(ProfileData + sizeof (__llvm_profile_header ) +
121121 Header -> BinaryIdsSize );
122- SrcDataEnd = SrcDataStart + Header -> DataSize ;
122+ SrcDataEnd = SrcDataStart + Header -> NumData ;
123123 SrcCountersStart = (char * )SrcDataEnd ;
124124 SrcCountersEnd = SrcCountersStart +
125- Header -> CountersSize * __llvm_profile_counter_entry_size ();
125+ Header -> NumCounters * __llvm_profile_counter_entry_size ();
126126 SrcNameStart = SrcCountersEnd ;
127127 SrcValueProfDataStart =
128128 SrcNameStart + Header -> NamesSize +
@@ -132,7 +132,7 @@ int __llvm_profile_merge_from_buffer(const char *ProfileData,
132132
133133 // Merge counters when there is no data section and debug info correlation is
134134 // enabled.
135- if (Header -> DataSize == 0 ) {
135+ if (Header -> NumData == 0 ) {
136136 if (!(__llvm_profile_get_version () & VARIANT_MASK_DBG_CORRELATE )) {
137137 PROF_ERR ("%s\n" , "Missing profile data section." );
138138 return 1 ;
0 commit comments