diff options
Diffstat (limited to 'compiler-rt/lib/profile/InstrProfilingPort.h')
-rw-r--r-- | compiler-rt/lib/profile/InstrProfilingPort.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/compiler-rt/lib/profile/InstrProfilingPort.h b/compiler-rt/lib/profile/InstrProfilingPort.h index da5b5c0f8bb..9462cf1a240 100644 --- a/compiler-rt/lib/profile/InstrProfilingPort.h +++ b/compiler-rt/lib/profile/InstrProfilingPort.h @@ -99,6 +99,16 @@ (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) #endif /* DIR_SEPARATOR_2 */ +#if defined(_WIN32) +static inline size_t getpagesize() { + SYSTEM_INFO S; + GetNativeSystemInfo(&S); + return S.dwPageSize; +} +#else /* defined(_WIN32) */ +#include <unistd.h> +#endif /* defined(_WIN32) */ + #define PROF_ERR(Format, ...) \ fprintf(stderr, "LLVM Profile Error: " Format, __VA_ARGS__); |