[llvm-commits] CVS: llvm/lib/Target/CBackend/Writer.cpp

Chris Lattner lattner at cs.uiuc.edu
Wed Jun 2 18:15:14 PDT 2004


Changes in directory llvm/lib/Target/CBackend:

Writer.cpp updated: 1.180 -> 1.181

---
Log message:

<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!



---
Diffs of the changes:  (+1 -1)

Index: llvm/lib/Target/CBackend/Writer.cpp
diff -u llvm/lib/Target/CBackend/Writer.cpp:1.180 llvm/lib/Target/CBackend/Writer.cpp:1.181
--- llvm/lib/Target/CBackend/Writer.cpp:1.180	Fri May 28 00:47:27 2004
+++ llvm/lib/Target/CBackend/Writer.cpp	Wed Jun  2 18:10:26 2004
@@ -660,7 +660,7 @@
 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"





More information about the llvm-commits mailing list