[llvm-commits] CVS: llvm/lib/Target/CBackend/Writer.cpp
Misha Brukman
brukman at cs.uiuc.edu
Mon Jul 12 16:37:28 PDT 2004
Changes in directory llvm/lib/Target/CBackend:
Writer.cpp updated: 1.187 -> 1.188
---
Log message:
Apple's MacOS X is another OS which does not provide alloca() via <alloca.h>
---
Diffs of the changes: (+1 -1)
Index: llvm/lib/Target/CBackend/Writer.cpp
diff -u llvm/lib/Target/CBackend/Writer.cpp:1.187 llvm/lib/Target/CBackend/Writer.cpp:1.188
--- llvm/lib/Target/CBackend/Writer.cpp:1.187 Sat Jul 10 23:16:31 2004
+++ llvm/lib/Target/CBackend/Writer.cpp Mon Jul 12 18:37:18 2004
@@ -664,7 +664,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(sun) || defined(__CYGWIN__)\n"
+ << "#if defined(sun) || defined(__CYGWIN__) || defined(__APPLE__)\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