[Ubsan] Fix the cast-overflow.cpp test to build on FreeBSD

Differential Revision: http://reviews.llvm.org/D6087

llvm-svn: 221596
This commit is contained in:
Viktor Kutuzov 2014-11-10 15:25:01 +00:00
parent dc6cbfe859
commit f686063f57
1 changed files with 5 additions and 0 deletions

View File

@ -20,6 +20,11 @@
# define BYTE_ORDER __DARWIN_BYTE_ORDER
# define BIG_ENDIAN __DARWIN_BIG_ENDIAN
# define LITTLE_ENDIAN __DARWIN_LITTLE_ENDIAN
#elif defined(__FreeBSD__)
# include <sys/endian.h>
# define BYTE_ORDER _BYTE_ORDER
# define BIG_ENDIAN _BIG_ENDIAN
# define LITTLE_ENDIAN _LITTLE_ENDIAN
#else
# include <endian.h>
# define BYTE_ORDER __BYTE_ORDER