diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2015-01-08 19:47:10 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2015-01-08 19:47:10 +0000 |
commit | f4341a5a66d0fa0f3c9599ea5c5d2d7b2b240c1d (patch) | |
tree | f47eabbd2a48be6d6fec3ddeeefae5b4aeb87dbc /contrib/compiler-rt/lib/profile/InstrProfilingPlatformDarwin.c | |
parent | bbf686ed602a158a5d2fcf9dd90f4bda25feef5e (diff) | |
parent | ca9211ecdede9bdedb812b2243a4abdb8dacd1b9 (diff) | |
download | src-f4341a5a66d0fa0f3c9599ea5c5d2d7b2b240c1d.tar.gz src-f4341a5a66d0fa0f3c9599ea5c5d2d7b2b240c1d.zip |
Update compiler-rt to trunk r224034. This brings a number of new
builtins, and also the various sanitizers. Support for these will be
added in a later commit.
Notes
Notes:
svn path=/head/; revision=276851
Diffstat (limited to 'contrib/compiler-rt/lib/profile/InstrProfilingPlatformDarwin.c')
-rw-r--r-- | contrib/compiler-rt/lib/profile/InstrProfilingPlatformDarwin.c | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/contrib/compiler-rt/lib/profile/InstrProfilingPlatformDarwin.c b/contrib/compiler-rt/lib/profile/InstrProfilingPlatformDarwin.c new file mode 100644 index 000000000000..02299cc4630c --- /dev/null +++ b/contrib/compiler-rt/lib/profile/InstrProfilingPlatformDarwin.c @@ -0,0 +1,43 @@ +/*===- InstrProfilingPlatformDarwin.c - Profile data on Darwin ------------===*\ +|* +|* The LLVM Compiler Infrastructure +|* +|* This file is distributed under the University of Illinois Open Source +|* License. See LICENSE.TXT for details. +|* +\*===----------------------------------------------------------------------===*/ + +#include "InstrProfiling.h" + +#if defined(__APPLE__) +/* Use linker magic to find the bounds of the Data section. */ +__attribute__((visibility("hidden"))) +extern __llvm_profile_data DataStart __asm("section$start$__DATA$__llvm_prf_data"); +__attribute__((visibility("hidden"))) +extern __llvm_profile_data DataEnd __asm("section$end$__DATA$__llvm_prf_data"); +__attribute__((visibility("hidden"))) +extern char NamesStart __asm("section$start$__DATA$__llvm_prf_names"); +__attribute__((visibility("hidden"))) +extern char NamesEnd __asm("section$end$__DATA$__llvm_prf_names"); +__attribute__((visibility("hidden"))) +extern uint64_t CountersStart __asm("section$start$__DATA$__llvm_prf_cnts"); +__attribute__((visibility("hidden"))) +extern uint64_t CountersEnd __asm("section$end$__DATA$__llvm_prf_cnts"); + +__attribute__((visibility("hidden"))) +const __llvm_profile_data *__llvm_profile_begin_data(void) { + return &DataStart; +} +__attribute__((visibility("hidden"))) +const __llvm_profile_data *__llvm_profile_end_data(void) { + return &DataEnd; +} +__attribute__((visibility("hidden"))) +const char *__llvm_profile_begin_names(void) { return &NamesStart; } +__attribute__((visibility("hidden"))) +const char *__llvm_profile_end_names(void) { return &NamesEnd; } +__attribute__((visibility("hidden"))) +uint64_t *__llvm_profile_begin_counters(void) { return &CountersStart; } +__attribute__((visibility("hidden"))) +uint64_t *__llvm_profile_end_counters(void) { return &CountersEnd; } +#endif |