summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorXinliang David Li <davidxl@google.com>2015-12-16 03:29:15 +0000
committerXinliang David Li <davidxl@google.com>2015-12-16 03:29:15 +0000
commit004273c0321f96065e840610853f1524f90de84a (patch)
tree537952ed3466e2d8418f7fff1deb54b0a40d86e2 /lib
parentfaa5183b5858b8777c41cb13a563710d301bce07 (diff)
[PGO] cleanup: unify prefix for portability macros
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@255748 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/profile/InstrProfiling.c8
-rw-r--r--lib/profile/InstrProfiling.h3
-rw-r--r--lib/profile/InstrProfilingBuffer.c9
-rw-r--r--lib/profile/InstrProfilingFile.c14
-rw-r--r--lib/profile/InstrProfilingPlatformDarwin.c24
-rw-r--r--lib/profile/InstrProfilingPlatformLinux.c31
-rw-r--r--lib/profile/InstrProfilingPlatformOther.c14
-rw-r--r--lib/profile/InstrProfilingPort.h27
-rw-r--r--lib/profile/InstrProfilingRuntime.cc2
-rw-r--r--lib/profile/InstrProfilingUtil.c2
-rw-r--r--lib/profile/InstrProfilingValue.c19
-rw-r--r--lib/profile/InstrProfilingWriter.c10
12 files changed, 83 insertions, 80 deletions
diff --git a/lib/profile/InstrProfiling.c b/lib/profile/InstrProfiling.c
index e6be7e722..58778aeec 100644
--- a/lib/profile/InstrProfiling.c
+++ b/lib/profile/InstrProfiling.c
@@ -18,7 +18,7 @@
char *(*GetEnvHook)(const char *) = 0;
-LLVM_LIBRARY_VISIBILITY uint64_t __llvm_profile_get_magic(void) {
+COMPILER_RT_VISIBILITY uint64_t __llvm_profile_get_magic(void) {
return sizeof(void *) == sizeof(uint64_t) ? (INSTR_PROF_RAW_MAGIC_64)
: (INSTR_PROF_RAW_MAGIC_32);
}
@@ -26,16 +26,16 @@ LLVM_LIBRARY_VISIBILITY uint64_t __llvm_profile_get_magic(void) {
/* Return the number of bytes needed to add to SizeInBytes to make it
* the result a multiple of 8.
*/
-LLVM_LIBRARY_VISIBILITY uint8_t
+COMPILER_RT_VISIBILITY uint8_t
__llvm_profile_get_num_padding_bytes(uint64_t SizeInBytes) {
return 7 & (sizeof(uint64_t) - SizeInBytes % sizeof(uint64_t));
}
-LLVM_LIBRARY_VISIBILITY uint64_t __llvm_profile_get_version(void) {
+COMPILER_RT_VISIBILITY uint64_t __llvm_profile_get_version(void) {
return INSTR_PROF_RAW_VERSION;
}
-LLVM_LIBRARY_VISIBILITY void __llvm_profile_reset_counters(void) {
+COMPILER_RT_VISIBILITY void __llvm_profile_reset_counters(void) {
uint64_t *I = __llvm_profile_begin_counters();
uint64_t *E = __llvm_profile_end_counters();
diff --git a/lib/profile/InstrProfiling.h b/lib/profile/InstrProfiling.h
index 560af584f..c924a42f6 100644
--- a/lib/profile/InstrProfiling.h
+++ b/lib/profile/InstrProfiling.h
@@ -19,7 +19,8 @@ enum ValueKind {
};
typedef void *IntPtrT;
-typedef struct LLVM_ALIGNAS(INSTR_PROF_DATA_ALIGNMENT) __llvm_profile_data {
+typedef struct COMPILER_RT_ALIGNAS(INSTR_PROF_DATA_ALIGNMENT)
+ __llvm_profile_data {
#define INSTR_PROF_DATA(Type, LLVMType, Name, Initializer) Type Name;
#include "InstrProfData.inc"
} __llvm_profile_data;
diff --git a/lib/profile/InstrProfilingBuffer.c b/lib/profile/InstrProfilingBuffer.c
index 295be690e..8bade76cf 100644
--- a/lib/profile/InstrProfilingBuffer.c
+++ b/lib/profile/InstrProfilingBuffer.c
@@ -12,7 +12,7 @@
#include <string.h>
-LLVM_LIBRARY_VISIBILITY
+COMPILER_RT_VISIBILITY
uint64_t __llvm_profile_get_size_for_buffer(void) {
const __llvm_profile_data *DataBegin = __llvm_profile_begin_data();
const __llvm_profile_data *DataEnd = __llvm_profile_end_data();
@@ -27,7 +27,7 @@ uint64_t __llvm_profile_get_size_for_buffer(void) {
#define PROFILE_RANGE_SIZE(Range) (Range##End - Range##Begin)
-LLVM_LIBRARY_VISIBILITY
+COMPILER_RT_VISIBILITY
uint64_t __llvm_profile_get_size_for_buffer_internal(
const __llvm_profile_data *DataBegin, const __llvm_profile_data *DataEnd,
const uint64_t *CountersBegin, const uint64_t *CountersEnd,
@@ -55,12 +55,11 @@ static uint32_t bufferWriter(ProfDataIOVec *IOVecs, uint32_t NumIOVecs,
return 0;
}
-LLVM_LIBRARY_VISIBILITY int
-__llvm_profile_write_buffer(char *Buffer) {
+COMPILER_RT_VISIBILITY int __llvm_profile_write_buffer(char *Buffer) {
return llvmWriteProfData(bufferWriter, Buffer, 0, 0);
}
-LLVM_LIBRARY_VISIBILITY int __llvm_profile_write_buffer_internal(
+COMPILER_RT_VISIBILITY int __llvm_profile_write_buffer_internal(
char *Buffer, const __llvm_profile_data *DataBegin,
const __llvm_profile_data *DataEnd, const uint64_t *CountersBegin,
const uint64_t *CountersEnd, const char *NamesBegin, const char *NamesEnd) {
diff --git a/lib/profile/InstrProfilingFile.c b/lib/profile/InstrProfilingFile.c
index ac0eeff6b..7f2923c30 100644
--- a/lib/profile/InstrProfilingFile.c
+++ b/lib/profile/InstrProfilingFile.c
@@ -56,8 +56,8 @@ static int writeFileWithName(const char *OutputName) {
return RetVal;
}
-LLVM_LIBRARY_WEAK int __llvm_profile_OwnsFilename = 0;
-LLVM_LIBRARY_WEAK const char *__llvm_profile_CurrentFilename = NULL;
+COMPILER_RT_WEAK int __llvm_profile_OwnsFilename = 0;
+COMPILER_RT_WEAK const char *__llvm_profile_CurrentFilename = NULL;
static void truncateCurrentFile(void) {
const char *Filename;
@@ -164,7 +164,7 @@ static void setFilenameAutomatically(void) {
resetFilenameToDefault();
}
-LLVM_LIBRARY_VISIBILITY
+COMPILER_RT_VISIBILITY
void __llvm_profile_initialize_file(void) {
/* Check if the filename has been initialized. */
if (__llvm_profile_CurrentFilename)
@@ -174,12 +174,12 @@ void __llvm_profile_initialize_file(void) {
setFilenameAutomatically();
}
-LLVM_LIBRARY_VISIBILITY
+COMPILER_RT_VISIBILITY
void __llvm_profile_set_filename(const char *Filename) {
setFilenamePossiblyWithPid(Filename);
}
-LLVM_LIBRARY_VISIBILITY
+COMPILER_RT_VISIBILITY
void __llvm_profile_override_default_filename(const char *Filename) {
/* If the env var is set, skip setting filename from argument. */
const char *Env_Filename = getenv("LLVM_PROFILE_FILE");
@@ -188,7 +188,7 @@ void __llvm_profile_override_default_filename(const char *Filename) {
setFilenamePossiblyWithPid(Filename);
}
-LLVM_LIBRARY_VISIBILITY
+COMPILER_RT_VISIBILITY
int __llvm_profile_write_file(void) {
int rc;
@@ -209,7 +209,7 @@ int __llvm_profile_write_file(void) {
static void writeFileWithoutReturn(void) { __llvm_profile_write_file(); }
-LLVM_LIBRARY_VISIBILITY
+COMPILER_RT_VISIBILITY
int __llvm_profile_register_write_file_atexit(void) {
static int HasBeenRegistered = 0;
diff --git a/lib/profile/InstrProfilingPlatformDarwin.c b/lib/profile/InstrProfilingPlatformDarwin.c
index 3da0f18c5..30ddbd2e4 100644
--- a/lib/profile/InstrProfilingPlatformDarwin.c
+++ b/lib/profile/InstrProfilingPlatformDarwin.c
@@ -11,36 +11,36 @@
#if defined(__APPLE__)
/* Use linker magic to find the bounds of the Data section. */
-LLVM_LIBRARY_VISIBILITY
+COMPILER_RT_VISIBILITY
extern __llvm_profile_data
DataStart __asm("section$start$__DATA$" INSTR_PROF_DATA_SECT_NAME_STR);
-LLVM_LIBRARY_VISIBILITY
+COMPILER_RT_VISIBILITY
extern __llvm_profile_data
DataEnd __asm("section$end$__DATA$" INSTR_PROF_DATA_SECT_NAME_STR);
-LLVM_LIBRARY_VISIBILITY
+COMPILER_RT_VISIBILITY
extern char
NamesStart __asm("section$start$__DATA$" INSTR_PROF_NAME_SECT_NAME_STR);
-LLVM_LIBRARY_VISIBILITY
+COMPILER_RT_VISIBILITY
extern char NamesEnd __asm("section$end$__DATA$" INSTR_PROF_NAME_SECT_NAME_STR);
-LLVM_LIBRARY_VISIBILITY
+COMPILER_RT_VISIBILITY
extern uint64_t
CountersStart __asm("section$start$__DATA$" INSTR_PROF_CNTS_SECT_NAME_STR);
-LLVM_LIBRARY_VISIBILITY
+COMPILER_RT_VISIBILITY
extern uint64_t
CountersEnd __asm("section$end$__DATA$" INSTR_PROF_CNTS_SECT_NAME_STR);
-LLVM_LIBRARY_VISIBILITY
+COMPILER_RT_VISIBILITY
const __llvm_profile_data *__llvm_profile_begin_data(void) {
return &DataStart;
}
-LLVM_LIBRARY_VISIBILITY
+COMPILER_RT_VISIBILITY
const __llvm_profile_data *__llvm_profile_end_data(void) { return &DataEnd; }
-LLVM_LIBRARY_VISIBILITY
+COMPILER_RT_VISIBILITY
const char *__llvm_profile_begin_names(void) { return &NamesStart; }
-LLVM_LIBRARY_VISIBILITY
+COMPILER_RT_VISIBILITY
const char *__llvm_profile_end_names(void) { return &NamesEnd; }
-LLVM_LIBRARY_VISIBILITY
+COMPILER_RT_VISIBILITY
uint64_t *__llvm_profile_begin_counters(void) { return &CountersStart; }
-LLVM_LIBRARY_VISIBILITY
+COMPILER_RT_VISIBILITY
uint64_t *__llvm_profile_end_counters(void) { return &CountersEnd; }
#endif
diff --git a/lib/profile/InstrProfilingPlatformLinux.c b/lib/profile/InstrProfilingPlatformLinux.c
index 06514c2e8..7843f47ca 100644
--- a/lib/profile/InstrProfilingPlatformLinux.c
+++ b/lib/profile/InstrProfilingPlatformLinux.c
@@ -22,37 +22,38 @@
/* Declare section start and stop symbols for various sections
* generated by compiler instrumentation.
*/
-extern __llvm_profile_data PROF_DATA_START LLVM_LIBRARY_VISIBILITY;
-extern __llvm_profile_data PROF_DATA_STOP LLVM_LIBRARY_VISIBILITY;
-extern uint64_t PROF_CNTS_START LLVM_LIBRARY_VISIBILITY;
-extern uint64_t PROF_CNTS_STOP LLVM_LIBRARY_VISIBILITY;
-extern char PROF_NAME_START LLVM_LIBRARY_VISIBILITY;
-extern char PROF_NAME_STOP LLVM_LIBRARY_VISIBILITY;
+extern __llvm_profile_data PROF_DATA_START COMPILER_RT_VISIBILITY;
+extern __llvm_profile_data PROF_DATA_STOP COMPILER_RT_VISIBILITY;
+extern uint64_t PROF_CNTS_START COMPILER_RT_VISIBILITY;
+extern uint64_t PROF_CNTS_STOP COMPILER_RT_VISIBILITY;
+extern char PROF_NAME_START COMPILER_RT_VISIBILITY;
+extern char PROF_NAME_STOP COMPILER_RT_VISIBILITY;
/* Add dummy data to ensure the section is always created. */
__llvm_profile_data
- __prof_data_sect_data[0] LLVM_SECTION(INSTR_PROF_DATA_SECT_NAME_STR);
-uint64_t __prof_cnts_sect_data[0] LLVM_SECTION(INSTR_PROF_CNTS_SECT_NAME_STR);
-char __prof_nms_sect_data[0] LLVM_SECTION(INSTR_PROF_NAME_SECT_NAME_STR);
+ __prof_data_sect_data[0] COMPILER_RT_SECTION(INSTR_PROF_DATA_SECT_NAME_STR);
+uint64_t
+ __prof_cnts_sect_data[0] COMPILER_RT_SECTION(INSTR_PROF_CNTS_SECT_NAME_STR);
+char __prof_nms_sect_data[0] COMPILER_RT_SECTION(INSTR_PROF_NAME_SECT_NAME_STR);
-LLVM_LIBRARY_VISIBILITY const __llvm_profile_data *
+COMPILER_RT_VISIBILITY const __llvm_profile_data *
__llvm_profile_begin_data(void) {
return &PROF_DATA_START;
}
-LLVM_LIBRARY_VISIBILITY const __llvm_profile_data *
+COMPILER_RT_VISIBILITY const __llvm_profile_data *
__llvm_profile_end_data(void) {
return &PROF_DATA_STOP;
}
-LLVM_LIBRARY_VISIBILITY const char *__llvm_profile_begin_names(void) {
+COMPILER_RT_VISIBILITY const char *__llvm_profile_begin_names(void) {
return &PROF_NAME_START;
}
-LLVM_LIBRARY_VISIBILITY const char *__llvm_profile_end_names(void) {
+COMPILER_RT_VISIBILITY const char *__llvm_profile_end_names(void) {
return &PROF_NAME_STOP;
}
-LLVM_LIBRARY_VISIBILITY uint64_t *__llvm_profile_begin_counters(void) {
+COMPILER_RT_VISIBILITY uint64_t *__llvm_profile_begin_counters(void) {
return &PROF_CNTS_START;
}
-LLVM_LIBRARY_VISIBILITY uint64_t *__llvm_profile_end_counters(void) {
+COMPILER_RT_VISIBILITY uint64_t *__llvm_profile_end_counters(void) {
return &PROF_CNTS_STOP;
}
#endif
diff --git a/lib/profile/InstrProfilingPlatformOther.c b/lib/profile/InstrProfilingPlatformOther.c
index 02f4b2191..3b9a1e9a7 100644
--- a/lib/profile/InstrProfilingPlatformOther.c
+++ b/lib/profile/InstrProfilingPlatformOther.c
@@ -26,7 +26,7 @@ static uint64_t *CountersLast = NULL;
* calls are only required (and only emitted) on targets where we haven't
* implemented linker magic to find the bounds of the sections.
*/
-LLVM_LIBRARY_VISIBILITY
+COMPILER_RT_VISIBILITY
void __llvm_profile_register_function(void *Data_) {
/* TODO: Only emit this function if we can't use linker magic. */
const __llvm_profile_data *Data = (__llvm_profile_data *)Data_;
@@ -55,16 +55,16 @@ void __llvm_profile_register_function(void *Data_) {
#undef UPDATE_LAST
}
-LLVM_LIBRARY_VISIBILITY
+COMPILER_RT_VISIBILITY
const __llvm_profile_data *__llvm_profile_begin_data(void) { return DataFirst; }
-LLVM_LIBRARY_VISIBILITY
+COMPILER_RT_VISIBILITY
const __llvm_profile_data *__llvm_profile_end_data(void) { return DataLast; }
-LLVM_LIBRARY_VISIBILITY
+COMPILER_RT_VISIBILITY
const char *__llvm_profile_begin_names(void) { return NamesFirst; }
-LLVM_LIBRARY_VISIBILITY
+COMPILER_RT_VISIBILITY
const char *__llvm_profile_end_names(void) { return NamesLast; }
-LLVM_LIBRARY_VISIBILITY
+COMPILER_RT_VISIBILITY
uint64_t *__llvm_profile_begin_counters(void) { return CountersFirst; }
-LLVM_LIBRARY_VISIBILITY
+COMPILER_RT_VISIBILITY
uint64_t *__llvm_profile_end_counters(void) { return CountersLast; }
#endif
diff --git a/lib/profile/InstrProfilingPort.h b/lib/profile/InstrProfilingPort.h
index 12f5ca78e..da4e213f7 100644
--- a/lib/profile/InstrProfilingPort.h
+++ b/lib/profile/InstrProfilingPort.h
@@ -11,28 +11,29 @@
#define PROFILE_INSTRPROFILING_PORT_H_
#ifdef _MSC_VER
-#define LLVM_ALIGNAS(x) __declspec(align(x))
-#define LLVM_LIBRARY_VISIBILITY
-#define LLVM_LIBRARY_WEAK __declspec(selectany)
+#define COMPILER_RTLIGNAS(x) __declspec(align(x))
+#define COMPILER_RT_VISIBILITY
+#define COMPILER_RT_WEAK __declspec(selectany)
#elif __GNUC__
-#define LLVM_ALIGNAS(x) __attribute__((aligned(x)))
-#define LLVM_LIBRARY_VISIBILITY __attribute__((visibility("hidden")))
-#define LLVM_LIBRARY_WEAK __attribute__((weak))
+#define COMPILER_RT_ALIGNAS(x) __attribute__((aligned(x)))
+#define COMPILER_RT_VISIBILITY __attribute__((visibility("hidden")))
+#define COMPILER_RT_WEAK __attribute__((weak))
#endif
-#define LLVM_SECTION(Sect) __attribute__((section(Sect)))
-
-#define PROF_ERR(Format, ...) \
- if (GetEnvHook && GetEnvHook("LLVM_PROFILE_VERBOSE_ERRORS")) \
- fprintf(stderr, Format, __VA_ARGS__);
+#define COMPILER_RT_SECTION(Sect) __attribute__((section(Sect)))
#if COMPILER_RT_HAS_ATOMICS == 1
-#define BOOL_CMPXCHG(Ptr, OldV, NewV) \
+#define COMPILER_RT_BOOL_CMPXCHG(Ptr, OldV, NewV) \
__sync_bool_compare_and_swap(Ptr, OldV, NewV)
#else
-#define BOOL_CMPXCHG(Ptr, OldV, NewV) BoolCmpXchg((void **)Ptr, OldV, NewV)
+#define COMPILER_RT_BOOL_CMPXCHG(Ptr, OldV, NewV) \
+ BoolCmpXchg((void **)Ptr, OldV, NewV)
#endif
+#define PROF_ERR(Format, ...) \
+ if (GetEnvHook && GetEnvHook("LLVM_PROFILE_VERBOSE_ERRORS")) \
+ fprintf(stderr, Format, __VA_ARGS__);
+
#if defined(__FreeBSD__) && defined(__i386__)
/* System headers define 'size_t' incorrectly on x64 FreeBSD (prior to
diff --git a/lib/profile/InstrProfilingRuntime.cc b/lib/profile/InstrProfilingRuntime.cc
index 77fca472a..12ad9f157 100644
--- a/lib/profile/InstrProfilingRuntime.cc
+++ b/lib/profile/InstrProfilingRuntime.cc
@@ -11,7 +11,7 @@ extern "C" {
#include "InstrProfiling.h"
-LLVM_LIBRARY_VISIBILITY int __llvm_profile_runtime;
+COMPILER_RT_VISIBILITY int __llvm_profile_runtime;
}
namespace {
diff --git a/lib/profile/InstrProfilingUtil.c b/lib/profile/InstrProfilingUtil.c
index 96d1e47d1..6f0443d3b 100644
--- a/lib/profile/InstrProfilingUtil.c
+++ b/lib/profile/InstrProfilingUtil.c
@@ -19,7 +19,7 @@ int mkdir(const char*, unsigned short);
#include <sys/types.h>
#endif
-LLVM_LIBRARY_VISIBILITY
+COMPILER_RT_VISIBILITY
void __llvm_profile_recursive_mkdir(char *path) {
int i;
diff --git a/lib/profile/InstrProfilingValue.c b/lib/profile/InstrProfilingValue.c
index eafa99bed..4888eec86 100644
--- a/lib/profile/InstrProfilingValue.c
+++ b/lib/profile/InstrProfilingValue.c
@@ -25,7 +25,7 @@
}
#if COMPILER_RT_HAS_ATOMICS != 1
-LLVM_LIBRARY_VISIBILITY
+COMPILER_RT_VISIBILITY
uint32_t BoolCmpXchg(void **Ptr, void *OldV, void *NewV) {
void *R = *Ptr;
if (R == OldV) {
@@ -37,20 +37,20 @@ uint32_t BoolCmpXchg(void **Ptr, void *OldV, void *NewV) {
#endif
/* This method is only used in value profiler mock testing. */
-LLVM_LIBRARY_VISIBILITY void
+COMPILER_RT_VISIBILITY void
__llvm_profile_set_num_value_sites(__llvm_profile_data *Data,
uint32_t ValueKind, uint16_t NumValueSites) {
*((uint16_t *)&Data->NumValueSites[ValueKind]) = NumValueSites;
}
/* This method is only used in value profiler mock testing. */
-LLVM_LIBRARY_VISIBILITY const __llvm_profile_data *
+COMPILER_RT_VISIBILITY const __llvm_profile_data *
__llvm_profile_iterate_data(const __llvm_profile_data *Data) {
return Data + 1;
}
/* This method is only used in value profiler mock testing. */
-LLVM_LIBRARY_VISIBILITY void *
+COMPILER_RT_VISIBILITY void *
__llvm_get_function_addr(const __llvm_profile_data *Data) {
return Data->FunctionPointer;
}
@@ -71,7 +71,7 @@ static int allocateValueProfileCounters(__llvm_profile_data *Data) {
(ValueProfNode **)calloc(NumVSites, sizeof(ValueProfNode *));
if (!Mem)
return 0;
- if (!BOOL_CMPXCHG(&Data->Values, 0, Mem)) {
+ if (!COMPILER_RT_BOOL_CMPXCHG(&Data->Values, 0, Mem)) {
free(Mem);
return 0;
}
@@ -96,7 +96,7 @@ static void deallocateValueProfileCounters(__llvm_profile_data *Data) {
free(Data->Values);
}
-LLVM_LIBRARY_VISIBILITY void
+COMPILER_RT_VISIBILITY void
__llvm_profile_instrument_target(uint64_t TargetValue, void *Data,
uint32_t CounterIndex) {
@@ -136,9 +136,10 @@ __llvm_profile_instrument_target(uint64_t TargetValue, void *Data,
uint32_t Success = 0;
if (!ValueCounters[CounterIndex])
- Success = BOOL_CMPXCHG(&ValueCounters[CounterIndex], 0, CurrentVNode);
+ Success =
+ COMPILER_RT_BOOL_CMPXCHG(&ValueCounters[CounterIndex], 0, CurrentVNode);
else if (PrevVNode && !PrevVNode->Next)
- Success = BOOL_CMPXCHG(&(PrevVNode->Next), 0, CurrentVNode);
+ Success = COMPILER_RT_BOOL_CMPXCHG(&(PrevVNode->Next), 0, CurrentVNode);
if (!Success) {
free(CurrentVNode);
@@ -167,7 +168,7 @@ static unsigned getVprofExtraBytes() {
#define DTOR_VALUE_RECORD(R) finalizeValueProfRuntimeRecord(&R);
-LLVM_LIBRARY_VISIBILITY uint64_t
+COMPILER_RT_VISIBILITY uint64_t
__llvm_profile_gather_value_data(uint8_t **VDataArray) {
size_t S = 0, RealSize = 0, BufferCapacity = 0, Extra = 0;
__llvm_profile_data *I;
diff --git a/lib/profile/InstrProfilingWriter.c b/lib/profile/InstrProfilingWriter.c
index 0147b312d..4c9e67965 100644
--- a/lib/profile/InstrProfilingWriter.c
+++ b/lib/profile/InstrProfilingWriter.c
@@ -10,10 +10,10 @@
#include "InstrProfiling.h"
#include "InstrProfilingInternal.h"
-LLVM_LIBRARY_VISIBILITY int llvmWriteProfData(WriterCallback Writer,
- void *WriterCtx,
- const uint8_t *ValueDataBegin,
- const uint64_t ValueDataSize) {
+COMPILER_RT_VISIBILITY int llvmWriteProfData(WriterCallback Writer,
+ void *WriterCtx,
+ const uint8_t *ValueDataBegin,
+ const uint64_t ValueDataSize) {
/* 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();
@@ -26,7 +26,7 @@ LLVM_LIBRARY_VISIBILITY int llvmWriteProfData(WriterCallback Writer,
ValueDataSize, NamesBegin, NamesEnd);
}
-LLVM_LIBRARY_VISIBILITY int llvmWriteProfDataImpl(
+COMPILER_RT_VISIBILITY int llvmWriteProfDataImpl(
WriterCallback Writer, void *WriterCtx,
const __llvm_profile_data *DataBegin, const __llvm_profile_data *DataEnd,
const uint64_t *CountersBegin, const uint64_t *CountersEnd,