diff options
| author | Vedant Kumar <vsk@apple.com> | 2017-12-14 18:43:14 +0000 |
|---|---|---|
| committer | Vedant Kumar <vsk@apple.com> | 2017-12-14 18:43:14 +0000 |
| commit | 5b0d5b45a241a9563d1075fa8e66be941b96443b (patch) | |
| tree | c84ab73bc6be3f68063549fbf9700a23f541fcf0 /compiler-rt/lib/profile/InstrProfilingPort.h | |
| parent | 873f032f3ac3622095df61d96f3a2b6271174ccb (diff) | |
| download | bcm5719-llvm-5b0d5b45a241a9563d1075fa8e66be941b96443b.tar.gz bcm5719-llvm-5b0d5b45a241a9563d1075fa8e66be941b96443b.zip | |
[profile] Port the runtime to Solaris
This includes a few nice bits of refactoring (e.g splitting out the
exclusive locking code into a common utility).
Patch by Rainer Orth!
Differential Revision: https://reviews.llvm.org/D40944
llvm-svn: 320726
Diffstat (limited to 'compiler-rt/lib/profile/InstrProfilingPort.h')
| -rw-r--r-- | compiler-rt/lib/profile/InstrProfilingPort.h | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/compiler-rt/lib/profile/InstrProfilingPort.h b/compiler-rt/lib/profile/InstrProfilingPort.h index 5789351956b..cd1264b0e57 100644 --- a/compiler-rt/lib/profile/InstrProfilingPort.h +++ b/compiler-rt/lib/profile/InstrProfilingPort.h @@ -7,6 +7,9 @@ |* \*===----------------------------------------------------------------------===*/ +/* This header must be included after all others so it can provide fallback + definitions for stuff missing in system headers. */ + #ifndef PROFILE_INSTRPROFILING_PORT_H_ #define PROFILE_INSTRPROFILING_PORT_H_ @@ -44,9 +47,6 @@ #define COMPILER_RT_GETHOSTNAME(Name, Len) ((void)(Name), (void)(Len), (-1)) #else #define COMPILER_RT_GETHOSTNAME(Name, Len) lprofGetHostName(Name, Len) -#ifndef _MSC_VER -#define COMPILER_RT_HAS_UNAME 1 -#endif #endif #if COMPILER_RT_HAS_ATOMICS == 1 @@ -107,6 +107,14 @@ #define PROF_NOTE(Format, ...) \ fprintf(stderr, "LLVM Profile Note: " Format, __VA_ARGS__); +#ifndef MAP_FILE +#define MAP_FILE 0 +#endif + +#ifndef O_BINARY +#define O_BINARY 0 +#endif + #if defined(__FreeBSD__) #include <inttypes.h> |

