summaryrefslogtreecommitdiffstats
path: root/compiler-rt/lib/profile/InstrProfilingPlatformLinux.c
diff options
context:
space:
mode:
Diffstat (limited to 'compiler-rt/lib/profile/InstrProfilingPlatformLinux.c')
-rw-r--r--compiler-rt/lib/profile/InstrProfilingPlatformLinux.c38
1 files changed, 15 insertions, 23 deletions
diff --git a/compiler-rt/lib/profile/InstrProfilingPlatformLinux.c b/compiler-rt/lib/profile/InstrProfilingPlatformLinux.c
index 282d6b4a9e0..ea0bd1328a7 100644
--- a/compiler-rt/lib/profile/InstrProfilingPlatformLinux.c
+++ b/compiler-rt/lib/profile/InstrProfilingPlatformLinux.c
@@ -12,44 +12,36 @@
#if defined(__linux__) || defined(__FreeBSD__)
#include <stdlib.h>
-extern __llvm_profile_data __start___llvm_prf_data
- __attribute__((visibility("hidden")));
-extern __llvm_profile_data __stop___llvm_prf_data
- __attribute__((visibility("hidden")));
-extern uint64_t __start___llvm_prf_cnts __attribute__((visibility("hidden")));
-extern uint64_t __stop___llvm_prf_cnts __attribute__((visibility("hidden")));
-extern char __start___llvm_prf_names __attribute__((visibility("hidden")));
-extern char __stop___llvm_prf_names __attribute__((visibility("hidden")));
+extern __llvm_profile_data __start___llvm_prf_data LLVM_LIBRARY_VISIBILITY;
+extern __llvm_profile_data __stop___llvm_prf_data LLVM_LIBRARY_VISIBILITY;
+extern uint64_t __start___llvm_prf_cnts LLVM_LIBRARY_VISIBILITY;
+extern uint64_t __stop___llvm_prf_cnts LLVM_LIBRARY_VISIBILITY;
+extern char __start___llvm_prf_names LLVM_LIBRARY_VISIBILITY;
+extern char __stop___llvm_prf_names LLVM_LIBRARY_VISIBILITY;
/* Add dummy data to ensure the section is always created. */
-__llvm_profile_data __llvm_prof_sect_data[0]
- __attribute__((section("__llvm_prf_data")));
-uint64_t __llvm_prof_cnts_sect_data[0]
- __attribute__((section("__llvm_prf_cnts")));
-char __llvm_prof_nms_sect_data[0] __attribute__((section("__llvm_prf_names")));
+__llvm_profile_data __llvm_prof_sect_data[0] LLVM_SECTION("__llvm_prf_data");
+uint64_t __llvm_prof_cnts_sect_data[0] LLVM_SECTION("__llvm_prf_cnts");
+char __llvm_prof_nms_sect_data[0] LLVM_SECTION("__llvm_prf_names");
-__attribute__((visibility("hidden"))) const __llvm_profile_data *
+LLVM_LIBRARY_VISIBILITY const __llvm_profile_data *
__llvm_profile_begin_data(void) {
return &__start___llvm_prf_data;
}
-__attribute__((visibility("hidden"))) const __llvm_profile_data *
+LLVM_LIBRARY_VISIBILITY const __llvm_profile_data *
__llvm_profile_end_data(void) {
return &__stop___llvm_prf_data;
}
-__attribute__((visibility("hidden"))) const char *__llvm_profile_begin_names(
- void) {
+LLVM_LIBRARY_VISIBILITY const char *__llvm_profile_begin_names(void) {
return &__start___llvm_prf_names;
}
-__attribute__((visibility("hidden"))) const char *__llvm_profile_end_names(
- void) {
+LLVM_LIBRARY_VISIBILITY const char *__llvm_profile_end_names(void) {
return &__stop___llvm_prf_names;
}
-__attribute__((visibility("hidden"))) uint64_t *__llvm_profile_begin_counters(
- void) {
+LLVM_LIBRARY_VISIBILITY uint64_t *__llvm_profile_begin_counters(void) {
return &__start___llvm_prf_cnts;
}
-__attribute__((visibility("hidden"))) uint64_t *__llvm_profile_end_counters(
- void) {
+LLVM_LIBRARY_VISIBILITY uint64_t *__llvm_profile_end_counters(void) {
return &__stop___llvm_prf_cnts;
}
#endif
OpenPOWER on IntegriCloud