[compiler-rt] r256647 - [PGO]: Eliminate custom typedefs in the FreeBSD case

Xinliang David Li via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 30 11:18:55 PST 2015


Author: davidxl
Date: Wed Dec 30 13:18:55 2015
New Revision: 256647

URL: http://llvm.org/viewvc/llvm-project?rev=256647&view=rev
Log:
[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

Modified:
    compiler-rt/trunk/lib/profile/InstrProfilingPort.h

Modified: compiler-rt/trunk/lib/profile/InstrProfilingPort.h
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/profile/InstrProfilingPort.h?rev=256647&r1=256646&r2=256647&view=diff
==============================================================================
--- compiler-rt/trunk/lib/profile/InstrProfilingPort.h (original)
+++ compiler-rt/trunk/lib/profile/InstrProfilingPort.h Wed Dec 30 13:18:55 2015
@@ -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>




More information about the llvm-commits mailing list