diff --git a/compiler-rt/lib/profile/InstrProfiling.c b/compiler-rt/lib/profile/InstrProfiling.c index 24820ec6d836..1c1d85af9860 100644 --- a/compiler-rt/lib/profile/InstrProfiling.c +++ b/compiler-rt/lib/profile/InstrProfiling.c @@ -16,7 +16,7 @@ #define INSTR_PROF_VALUE_PROF_DATA #include "InstrProfData.inc" -char *(*GetEnvHook)(const char *) = 0; +COMPILER_RT_VISIBILITY char *(*GetEnvHook)(const char *) = 0; COMPILER_RT_WEAK uint64_t __llvm_profile_raw_version = INSTR_PROF_RAW_VERSION; diff --git a/compiler-rt/lib/profile/InstrProfilingInternal.h b/compiler-rt/lib/profile/InstrProfilingInternal.h index 2645858fc090..e72bfee71f79 100644 --- a/compiler-rt/lib/profile/InstrProfilingInternal.h +++ b/compiler-rt/lib/profile/InstrProfilingInternal.h @@ -114,9 +114,9 @@ int lprofWriteDataImpl(WriterCallback Writer, void *WriterCtx, void lprofMergeValueProfData(struct ValueProfData *SrcValueProfData, __llvm_profile_data *DstData); -extern char *(*GetEnvHook)(const char *); -extern void (*FreeHook)(void *); -extern void *(*CallocHook)(size_t, size_t); +COMPILER_RT_VISIBILITY extern char *(*GetEnvHook)(const char *); +COMPILER_RT_VISIBILITY extern void (*FreeHook)(void *); +COMPILER_RT_VISIBILITY extern void *(*CallocHook)(size_t, size_t); extern void (*VPMergeHook)(struct ValueProfData *, __llvm_profile_data *); extern uint32_t VPBufferSize; diff --git a/compiler-rt/lib/profile/InstrProfilingWriter.c b/compiler-rt/lib/profile/InstrProfilingWriter.c index 18b3f34640bd..9513931c63dc 100644 --- a/compiler-rt/lib/profile/InstrProfilingWriter.c +++ b/compiler-rt/lib/profile/InstrProfilingWriter.c @@ -13,8 +13,8 @@ #define INSTR_PROF_VALUE_PROF_DATA #include "InstrProfData.inc" -void (*FreeHook)(void *) = NULL; -void* (*CallocHook)(size_t, size_t) = NULL; +COMPILER_RT_VISIBILITY void (*FreeHook)(void *) = NULL; +COMPILER_RT_VISIBILITY void *(*CallocHook)(size_t, size_t) = NULL; uint32_t VPBufferSize = 0; /* The buffer writer is reponsponsible in keeping writer state