mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-10 14:36:12 +00:00
Fix alloca support for Cygwin. On cygwin its __alloca not __builtin_alloca
llvm-svn: 19776
This commit is contained in:
parent
5c7b6e83f0
commit
e48557f583
@ -723,7 +723,10 @@ 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"
|
||||
<< "#if defined(__CYGWIN__) || defined(__APPLE__)\n"
|
||||
<< "#if defined(__CYGWIN__)\n"
|
||||
<< "extern void *_alloca(unsigned long);\n"
|
||||
<< "#define alloca(x) _alloca(x)\n"
|
||||
<< "#elif defined(__APPLE__)\n"
|
||||
<< "extern void *__builtin_alloca(unsigned long);\n"
|
||||
<< "#define alloca(x) __builtin_alloca(x)\n"
|
||||
<< "#elif defined(__sun__)\n"
|
||||
|
Loading…
x
Reference in New Issue
Block a user