diff options
| author | Chris Lattner <sabre@nondot.org> | 2004-06-02 23:10:26 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2004-06-02 23:10:26 +0000 |
| commit | 4f816d2e38ee5ef034777aa5f4f2ffb8d106c4b6 (patch) | |
| tree | 969d4192564a1dbdbc70d05ca26625296d2dbf34 /llvm/lib/Target/CBackend/Writer.cpp | |
| parent | 60f37d6df7b3110bb615d74010fc19079b950332 (diff) | |
| download | bcm5719-llvm-4f816d2e38ee5ef034777aa5f4f2ffb8d106c4b6.tar.gz bcm5719-llvm-4f816d2e38ee5ef034777aa5f4f2ffb8d106c4b6.zip | |
<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!
llvm-svn: 13975
Diffstat (limited to 'llvm/lib/Target/CBackend/Writer.cpp')
| -rw-r--r-- | llvm/lib/Target/CBackend/Writer.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Target/CBackend/Writer.cpp b/llvm/lib/Target/CBackend/Writer.cpp index b73a4e40cd8..d993919f8b1 100644 --- a/llvm/lib/Target/CBackend/Writer.cpp +++ b/llvm/lib/Target/CBackend/Writer.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" |

