[Ubsan] Fix the cast-overflow.cpp test to build on FreeBSD
authorViktor Kutuzov <vkutuzov@accesssoftek.com>
Mon, 10 Nov 2014 15:25:01 +0000 (15:25 +0000)
committerViktor Kutuzov <vkutuzov@accesssoftek.com>
Mon, 10 Nov 2014 15:25:01 +0000 (15:25 +0000)
Differential Revision: http://reviews.llvm.org/D6087

llvm-svn: 221596

compiler-rt/test/ubsan/TestCases/Float/cast-overflow.cpp

index 05cd756..22991e0 100644 (file)
 # 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