Apple's MacOS X is another OS which does not provide alloca() via <alloca.h>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14781 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Misha Brukman 2004-07-12 23:37:18 +00:00
parent 01eca8d2c2
commit f028f82a58
2 changed files with 2 additions and 2 deletions

View File

@ -664,7 +664,7 @@ void CWriter::writeOperand(Value *Operand) {
static void generateCompilerSpecificCode(std::ostream& Out) {
// Alloca is hard to get, and we don't want to include stdlib.h here...
Out << "/* get a declaration for alloca */\n"
<< "#if defined(sun) || defined(__CYGWIN__)\n"
<< "#if defined(sun) || defined(__CYGWIN__) || defined(__APPLE__)\n"
<< "extern void *__builtin_alloca(unsigned long);\n"
<< "#define alloca(x) __builtin_alloca(x)\n"
<< "#else\n"

View File

@ -664,7 +664,7 @@ void CWriter::writeOperand(Value *Operand) {
static void generateCompilerSpecificCode(std::ostream& Out) {
// Alloca is hard to get, and we don't want to include stdlib.h here...
Out << "/* get a declaration for alloca */\n"
<< "#if defined(sun) || defined(__CYGWIN__)\n"
<< "#if defined(sun) || defined(__CYGWIN__) || defined(__APPLE__)\n"
<< "extern void *__builtin_alloca(unsigned long);\n"
<< "#define alloca(x) __builtin_alloca(x)\n"
<< "#else\n"