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

John Criswell criswell at cs.uiuc.edu
Thu Dec 2 11:03:04 PST 2004



Changes in directory llvm/lib/Target/CBackend:

Writer.cpp updated: 1.210 -> 1.211
---
Log message:

Reverting revision 1.209.
Including alloca.h on Solaris brings in the prototype of strftime(), which
breaks compilation of CBE generated code.


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

Index: llvm/lib/Target/CBackend/Writer.cpp
diff -u llvm/lib/Target/CBackend/Writer.cpp:1.210 llvm/lib/Target/CBackend/Writer.cpp:1.211
--- llvm/lib/Target/CBackend/Writer.cpp:1.210	Tue Nov 30 15:33:58 2004
+++ llvm/lib/Target/CBackend/Writer.cpp	Thu Dec  2 13:02:49 2004
@@ -710,7 +710,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"
-      << "#if defined(__CYGWIN__) || defined(__APPLE__)\n"
+      << "#if defined(sun) || defined(__CYGWIN__) || defined(__APPLE__)\n"
       << "extern void *__builtin_alloca(unsigned long);\n"
       << "#define alloca(x) __builtin_alloca(x)\n"
       << "#elif defined(__FreeBSD__)\n"






More information about the llvm-commits mailing list