[compiler-rt] r277300 - Fix ASan alloca_constant_size.cc test on FreeBSD.
Dimitry Andric via llvm-commits
llvm-commits at lists.llvm.org
Sun Jul 31 13:16:59 PDT 2016
Author: dim
Date: Sun Jul 31 15:16:59 2016
New Revision: 277300
URL: http://llvm.org/viewvc/llvm-project?rev=277300&view=rev
Log:
Fix ASan alloca_constant_size.cc test on FreeBSD.
On FreeBSD <alloca.h> does not exist: alloca(3) is defined in <stdlib.h>
instead.
Modified:
compiler-rt/trunk/test/asan/TestCases/alloca_constant_size.cc
Modified: compiler-rt/trunk/test/asan/TestCases/alloca_constant_size.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/alloca_constant_size.cc?rev=277300&r1=277299&r2=277300&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/alloca_constant_size.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/alloca_constant_size.cc Sun Jul 31 15:16:59 2016
@@ -10,6 +10,8 @@
// MSVC provides _alloca instead of alloca.
#if defined(_MSC_VER) && !defined(alloca)
# define alloca _alloca
+#elif defined(__FreeBSD__)
+#include <stdlib.h>
#else
#include <alloca.h>
#endif
More information about the llvm-commits
mailing list