[compiler-rt] r253503 - Fix format of previous patch (NFC)
Xinliang David Li via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 18 13:11:47 PST 2015
Author: davidxl
Date: Wed Nov 18 15:11:46 2015
New Revision: 253503
URL: http://llvm.org/viewvc/llvm-project?rev=253503&view=rev
Log:
Fix format of previous patch (NFC)
Modified:
compiler-rt/trunk/lib/profile/InstrProfilingFile.c
compiler-rt/trunk/lib/profile/InstrProfilingInternal.h
compiler-rt/trunk/lib/profile/InstrProfilingWriter.c
Modified: compiler-rt/trunk/lib/profile/InstrProfilingFile.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/profile/InstrProfilingFile.c?rev=253503&r1=253502&r2=253503&view=diff
==============================================================================
--- compiler-rt/trunk/lib/profile/InstrProfilingFile.c (original)
+++ compiler-rt/trunk/lib/profile/InstrProfilingFile.c Wed Nov 18 15:11:46 2015
@@ -8,8 +8,8 @@
\*===----------------------------------------------------------------------===*/
#include "InstrProfiling.h"
-#include "InstrProfilingUtil.h"
#include "InstrProfilingInternal.h"
+#include "InstrProfilingUtil.h"
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
@@ -21,13 +21,14 @@ static size_t FileWriter(const void *Dat
void **File) {
return fwrite(Data, ElmSize, NumElm, (FILE *)*File);
}
- uint8_t *ValueDataBegin = NULL;
+uint8_t *ValueDataBegin = NULL;
static int writeFile(FILE *File) {
uint8_t *ValueDataBegin = NULL;
- const uint64_t ValueDataSize = __llvm_profile_gather_value_data(&ValueDataBegin);
+ const uint64_t ValueDataSize =
+ __llvm_profile_gather_value_data(&ValueDataBegin);
int r = llvmWriteProfData(File, ValueDataBegin, ValueDataSize, FileWriter);
- free (ValueDataBegin);
+ free(ValueDataBegin);
return r;
}
Modified: compiler-rt/trunk/lib/profile/InstrProfilingInternal.h
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/profile/InstrProfilingInternal.h?rev=253503&r1=253502&r2=253503&view=diff
==============================================================================
--- compiler-rt/trunk/lib/profile/InstrProfilingInternal.h (original)
+++ compiler-rt/trunk/lib/profile/InstrProfilingInternal.h Wed Nov 18 15:11:46 2015
@@ -43,13 +43,15 @@ int __llvm_profile_write_buffer_internal
*/
typedef size_t (*WriterCallback)(const void *Data, size_t ElmS, size_t NumElm,
void **BufferOrFile);
-int llvmWriteProfData(void *BufferOrFile, const uint8_t *ValueDataBegin, const uint64_t ValueDataSize, WriterCallback Writer);
+int llvmWriteProfData(void *BufferOrFile, const uint8_t *ValueDataBegin,
+ const uint64_t ValueDataSize, WriterCallback Writer);
int llvmWriteProfDataImpl(void *BufferOrFile, WriterCallback Writer,
const __llvm_profile_data *DataBegin,
const __llvm_profile_data *DataEnd,
- const uint64_t *CountersBegin, const uint64_t *CountersEnd,
- const uint8_t *ValueDataBegin, const uint64_t ValueDataSize,
- const char *NamesBegin,
+ const uint64_t *CountersBegin,
+ const uint64_t *CountersEnd,
+ const uint8_t *ValueDataBegin,
+ const uint64_t ValueDataSize, const char *NamesBegin,
const char *NamesEnd);
#endif
Modified: compiler-rt/trunk/lib/profile/InstrProfilingWriter.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/profile/InstrProfilingWriter.c?rev=253503&r1=253502&r2=253503&view=diff
==============================================================================
--- compiler-rt/trunk/lib/profile/InstrProfilingWriter.c (original)
+++ compiler-rt/trunk/lib/profile/InstrProfilingWriter.c Wed Nov 18 15:11:46 2015
@@ -11,7 +11,8 @@
#include "InstrProfilingInternal.h"
__attribute__((visibility("hidden"))) int
-llvmWriteProfData(void *BufferOrFile, const uint8_t * ValueDataBegin, const uint64_t ValueDataSize, WriterCallback Writer) {
+llvmWriteProfData(void *BufferOrFile, const uint8_t *ValueDataBegin,
+ const uint64_t ValueDataSize, WriterCallback Writer) {
/* Match logic in __llvm_profile_write_buffer(). */
const __llvm_profile_data *DataBegin = __llvm_profile_begin_data();
const __llvm_profile_data *DataEnd = __llvm_profile_end_data();
@@ -20,10 +21,8 @@ llvmWriteProfData(void *BufferOrFile, co
const char *NamesBegin = __llvm_profile_begin_names();
const char *NamesEnd = __llvm_profile_end_names();
return llvmWriteProfDataImpl(BufferOrFile, Writer, DataBegin, DataEnd,
- CountersBegin, CountersEnd,
- ValueDataBegin, ValueDataSize,
- NamesBegin,
- NamesEnd);
+ CountersBegin, CountersEnd, ValueDataBegin,
+ ValueDataSize, NamesBegin, NamesEnd);
}
__attribute__((visibility("hidden"))) int llvmWriteProfDataImpl(
@@ -60,10 +59,10 @@ __attribute__((visibility("hidden"))) in
Header.ValueDataDelta = (uintptr_t)ValueDataBegin;
/* Write the data. */
-#define CHECK_write(Data, Size, Length, BuffOrFile) \
- do { \
- if (Writer(Data, Size, Length, &BuffOrFile) != Length) \
- return -1; \
+#define CHECK_write(Data, Size, Length, BuffOrFile) \
+ do { \
+ if (Writer(Data, Size, Length, &BuffOrFile) != Length) \
+ return -1; \
} while (0)
CHECK_write(&Header, sizeof(__llvm_profile_header), 1, BufferOrFile);
CHECK_write(DataBegin, sizeof(__llvm_profile_data), DataSize, BufferOrFile);
More information about the llvm-commits
mailing list