Don't include alloca.h on FreeBSD.
authorBrian Gaeke <gaeke@uiuc.edu>
Mon, 16 Jun 2003 23:57:13 +0000 (23:57 +0000)
committerBrian Gaeke <gaeke@uiuc.edu>
Mon, 16 Jun 2003 23:57:13 +0000 (23:57 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6728 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/CBackend/CBackend.cpp
lib/Target/CBackend/Writer.cpp

index 0b7ad64d231e4fccc693bf25b801dd87ed3b1967..3dfd8f9cd00b6956cc69a02865f99395dc053e9b 100644 (file)
@@ -528,7 +528,9 @@ static void generateAllocaDecl(std::ostream& Out) {
       << "extern void *__builtin_alloca(unsigned long);\n"
       << "#define alloca(x) __builtin_alloca(x)\n"
       << "#else\n"
+      << "#ifndef __FreeBSD__\n"
       << "#include <alloca.h>\n"
+      << "#endif\n"
       << "#endif\n\n";
 }
 
index 0b7ad64d231e4fccc693bf25b801dd87ed3b1967..3dfd8f9cd00b6956cc69a02865f99395dc053e9b 100644 (file)
@@ -528,7 +528,9 @@ static void generateAllocaDecl(std::ostream& Out) {
       << "extern void *__builtin_alloca(unsigned long);\n"
       << "#define alloca(x) __builtin_alloca(x)\n"
       << "#else\n"
+      << "#ifndef __FreeBSD__\n"
       << "#include <alloca.h>\n"
+      << "#endif\n"
       << "#endif\n\n";
 }