mirror of
https://github.com/RPCSX/llvm.git
synced 2024-12-05 10:27:02 +00:00
FreeBSD uses GCC. Patch contributed by Jeff Cohen!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16756 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
37874058f4
commit
523001f1bb
@ -702,13 +702,12 @@ 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(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.
|
||||
|
@ -702,13 +702,12 @@ 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(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.
|
||||
|
Loading…
Reference in New Issue
Block a user