diff options
author | Xinliang David Li <davidxl@google.com> | 2015-12-30 19:18:55 +0000 |
---|---|---|
committer | Xinliang David Li <davidxl@google.com> | 2015-12-30 19:18:55 +0000 |
commit | 86eb1393dcb420fdb4f8e81dd46726d1462b79c5 (patch) | |
tree | 2dcce76bb59486911f87e7e475ef1bd41328a20e /lib/profile | |
parent | 57de7fe3f0e83ea62c48e0a68f3e27e03dfa70fe (diff) |
[PGO]: Eliminate custom typedefs in the FreeBSD case
Patch by: Sean Bruno
Use o/s provided sys/types.h to bring in Profiling types.
Differential Revision: http://reviews.llvm.org/D15088
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@256647 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/profile')
-rw-r--r-- | lib/profile/InstrProfilingPort.h | 22 |
1 files changed, 4 insertions, 18 deletions
diff --git a/lib/profile/InstrProfilingPort.h b/lib/profile/InstrProfilingPort.h index da4f18fcb..5da814a4a 100644 --- a/lib/profile/InstrProfilingPort.h +++ b/lib/profile/InstrProfilingPort.h @@ -47,26 +47,12 @@ if (GetEnvHook && GetEnvHook("LLVM_PROFILE_VERBOSE_ERRORS")) \ fprintf(stderr, Format, __VA_ARGS__); -#if defined(__FreeBSD__) && defined(__i386__) +#if defined(__FreeBSD__) -/* System headers define 'size_t' incorrectly on x64 FreeBSD (prior to - * FreeBSD 10, r232261) when compiled in 32-bit mode. - */ -#define PRIu64 "llu" -typedef unsigned char uint8_t; -typedef unsigned short uint16_t; -typedef unsigned int uint32_t; -typedef unsigned long long uint64_t; -typedef uint32_t uintptr_t; -#elif defined(__FreeBSD__) && defined(__x86_64__) -#define PRIu64 "lu" -typedef unsigned char uint8_t; -typedef unsigned short uint16_t; -typedef unsigned int uint32_t; -typedef unsigned long long uint64_t; -typedef unsigned long int uintptr_t; +#include <inttypes.h> +#include <sys/types.h> -#else /* defined(__FreeBSD__) && defined(__i386__) */ +#else /* defined(__FreeBSD__) */ #include <inttypes.h> #include <stdint.h> |