From: Brian Gaeke Date: Tue, 30 Nov 2004 21:27:01 +0000 (+0000) Subject: Sparcs behave better if we use and avoid messing with __builtin_alloca. X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=33ce43e8a8df2323c652232db19d86ba2cc9c1e1;p=oota-llvm.git Sparcs behave better if we use and avoid messing with __builtin_alloca. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18397 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/CBackend/CBackend.cpp b/lib/Target/CBackend/CBackend.cpp index 4e8b631ad5c..7f6cadca49c 100644 --- a/lib/Target/CBackend/CBackend.cpp +++ b/lib/Target/CBackend/CBackend.cpp @@ -707,7 +707,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__) || defined(__APPLE__)\n" + << "#if defined(__CYGWIN__) || defined(__APPLE__)\n" << "extern void *__builtin_alloca(unsigned long);\n" << "#define alloca(x) __builtin_alloca(x)\n" << "#elif defined(__FreeBSD__)\n" diff --git a/lib/Target/CBackend/Writer.cpp b/lib/Target/CBackend/Writer.cpp index 4e8b631ad5c..7f6cadca49c 100644 --- a/lib/Target/CBackend/Writer.cpp +++ b/lib/Target/CBackend/Writer.cpp @@ -707,7 +707,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__) || defined(__APPLE__)\n" + << "#if defined(__CYGWIN__) || defined(__APPLE__)\n" << "extern void *__builtin_alloca(unsigned long);\n" << "#define alloca(x) __builtin_alloca(x)\n" << "#elif defined(__FreeBSD__)\n"