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

Chris Lattner lattner at cs.uiuc.edu
Tue Oct 5 20:15:58 PDT 2004



Changes in directory llvm/lib/Target/CBackend:

Writer.cpp updated: 1.198 -> 1.199
---
Log message:

FreeBSD uses GCC.  Patch contributed by Jeff Cohen!


---
Diffs of the changes:  (+2 -3)

Index: llvm/lib/Target/CBackend/Writer.cpp
diff -u llvm/lib/Target/CBackend/Writer.cpp:1.198 llvm/lib/Target/CBackend/Writer.cpp:1.199
--- llvm/lib/Target/CBackend/Writer.cpp:1.198	Mon Sep 27 21:40:37 2004
+++ llvm/lib/Target/CBackend/Writer.cpp	Tue Oct  5 22:15:44 2004
@@ -702,13 +702,12 @@
 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(sun) || defined(__CYGWIN__) || defined(__APPLE__) || "
+      << "defined(__FreeBSD__)\n"
       << "extern void *__builtin_alloca(unsigned long);\n"
       << "#define alloca(x) __builtin_alloca(x)\n"
       << "#else\n"
-      << "#ifndef __FreeBSD__\n"
       << "#include <alloca.h>\n"
-      << "#endif\n"
       << "#endif\n\n";
 
   // We output GCC specific attributes to preserve 'linkonce'ness on globals.






More information about the llvm-commits mailing list