summaryrefslogtreecommitdiffstats
path: root/compiler-rt/lib
diff options
context:
space:
mode:
Diffstat (limited to 'compiler-rt/lib')
-rw-r--r--compiler-rt/lib/profile/InstrProfilingBuffer.c17
-rw-r--r--compiler-rt/lib/profile/InstrProfilingFile.c17
2 files changed, 16 insertions, 18 deletions
diff --git a/compiler-rt/lib/profile/InstrProfilingBuffer.c b/compiler-rt/lib/profile/InstrProfilingBuffer.c
index 8fc0117e949..8c6d43e7b45 100644
--- a/compiler-rt/lib/profile/InstrProfilingBuffer.c
+++ b/compiler-rt/lib/profile/InstrProfilingBuffer.c
@@ -35,15 +35,14 @@ int __llvm_profile_write_buffer(char *Buffer) {
const uint64_t NamesSize = NamesEnd - NamesBegin;
/* Create the header. */
- uint64_t Header[PROFILE_HEADER_SIZE] = {
- __llvm_profile_get_magic(),
- __llvm_profile_get_version(),
- DataSize,
- CountersSize,
- NamesSize,
- (uintptr_t)CountersBegin,
- (uintptr_t)NamesBegin
- };
+ uint64_t Header[PROFILE_HEADER_SIZE];
+ Header[0] = __llvm_profile_get_magic();
+ Header[1] = __llvm_profile_get_version();
+ Header[2] = DataSize;
+ Header[3] = CountersSize;
+ Header[4] = NamesSize;
+ Header[5] = (uintptr_t)CountersBegin;
+ Header[6] = (uintptr_t)NamesBegin;
/* Write the data. */
#define UPDATE_memcpy(Data, Size) \
diff --git a/compiler-rt/lib/profile/InstrProfilingFile.c b/compiler-rt/lib/profile/InstrProfilingFile.c
index 1ce7cae3a78..2c40ca5af4f 100644
--- a/compiler-rt/lib/profile/InstrProfilingFile.c
+++ b/compiler-rt/lib/profile/InstrProfilingFile.c
@@ -27,15 +27,14 @@ static int writeFile(FILE *File) {
const uint64_t NamesSize = NamesEnd - NamesBegin;
/* Create the header. */
- uint64_t Header[PROFILE_HEADER_SIZE] = {
- __llvm_profile_get_magic(),
- __llvm_profile_get_version(),
- DataSize,
- CountersSize,
- NamesSize,
- (uintptr_t)CountersBegin,
- (uintptr_t)NamesBegin
- };
+ uint64_t Header[PROFILE_HEADER_SIZE];
+ Header[0] = __llvm_profile_get_magic();
+ Header[1] = __llvm_profile_get_version();
+ Header[2] = DataSize;
+ Header[3] = CountersSize;
+ Header[4] = NamesSize;
+ Header[5] = (uintptr_t)CountersBegin;
+ Header[6] = (uintptr_t)NamesBegin;
/* Write the data. */
#define CHECK_fwrite(Data, Size, Length, File) \
OpenPOWER on IntegriCloud