aboutsummaryrefslogtreecommitdiff
path: root/lib/Target/CBackend/CBackend.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-06-02 23:10:26 +0000
committerChris Lattner <sabre@nondot.org>2004-06-02 23:10:26 +0000
commit8fcf797f79cbbb1cc008589885e3d3abeed712b7 (patch)
tree1bd815ecc20112d2cd0128131f5ce369b94cc8e5 /lib/Target/CBackend/CBackend.cpp
parent407d7c886cb909dd9431546d9a656cebe0aec576 (diff)
<alloca.h> on cygwin pulls in a ton of stuff (macros and function protos)
that we REALLY don't want in the CBE code. With this fix, the CBE passes all of the MultiSource tests on cygwin that it does on linux. Yaay! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13975 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/CBackend/CBackend.cpp')
-rw-r--r--lib/Target/CBackend/CBackend.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Target/CBackend/CBackend.cpp b/lib/Target/CBackend/CBackend.cpp
index b73a4e40cd..d993919f8b 100644
--- a/lib/Target/CBackend/CBackend.cpp
+++ b/lib/Target/CBackend/CBackend.cpp
@@ -660,7 +660,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"
- << "#ifdef sun\n"
+ << "#if defined(sun) || defined(__CYGWIN__)\n"
<< "extern void *__builtin_alloca(unsigned long);\n"
<< "#define alloca(x) __builtin_alloca(x)\n"
<< "#else\n"