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 | 3e0e6e75d7fa9e199f00285a9c056f7f9e1e75f1 (patch) | |
tree | fed272864bd31439f044d4ec90070dd697570c04 | |
parent | 26aa93586a998116c8bc8cb4ba7ea1a6accf269d (diff) | |
download | bcm5719-llvm-3e0e6e75d7fa9e199f00285a9c056f7f9e1e75f1.tar.gz bcm5719-llvm-3e0e6e75d7fa9e199f00285a9c056f7f9e1e75f1.zip |
[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
llvm-svn: 256647
-rw-r--r-- | compiler-rt/lib/profile/InstrProfilingPort.h | 22 |
1 files changed, 4 insertions, 18 deletions
diff --git a/compiler-rt/lib/profile/InstrProfilingPort.h b/compiler-rt/lib/profile/InstrProfilingPort.h index da4f18fcbb4..5da814a4a3d 100644 --- a/compiler-rt/lib/profile/InstrProfilingPort.h +++ b/compiler-rt/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> |