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

Viktor Kutuzov vkutuzov at accesssoftek.com
Mon Nov 10 07:25:01 PST 2014


Author: vkutuzov
Date: Mon Nov 10 09:25:01 2014
New Revision: 221596

URL: http://llvm.org/viewvc/llvm-project?rev=221596&view=rev
Log:
[Ubsan] Fix the cast-overflow.cpp test to build on FreeBSD
Differential Revision: http://reviews.llvm.org/D6087

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

Modified: compiler-rt/trunk/test/ubsan/TestCases/Float/cast-overflow.cpp
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/ubsan/TestCases/Float/cast-overflow.cpp?rev=221596&r1=221595&r2=221596&view=diff
==============================================================================
--- compiler-rt/trunk/test/ubsan/TestCases/Float/cast-overflow.cpp (original)
+++ compiler-rt/trunk/test/ubsan/TestCases/Float/cast-overflow.cpp Mon Nov 10 09:25:01 2014
@@ -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





More information about the llvm-commits mailing list