From: Brian Gaeke Date: Mon, 16 Jun 2003 23:57:13 +0000 (+0000) Subject: Don't include alloca.h on FreeBSD. X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=a0145ccb20cd7ebe2ddeaa37afd74e39bf9e963b;p=oota-llvm.git Don't include alloca.h on FreeBSD. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6728 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/CBackend/CBackend.cpp b/lib/Target/CBackend/CBackend.cpp index 0b7ad64d231..3dfd8f9cd00 100644 --- a/lib/Target/CBackend/CBackend.cpp +++ b/lib/Target/CBackend/CBackend.cpp @@ -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 \n" + << "#endif\n" << "#endif\n\n"; } diff --git a/lib/Target/CBackend/Writer.cpp b/lib/Target/CBackend/Writer.cpp index 0b7ad64d231..3dfd8f9cd00 100644 --- a/lib/Target/CBackend/Writer.cpp +++ b/lib/Target/CBackend/Writer.cpp @@ -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 \n" + << "#endif\n" << "#endif\n\n"; }