aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-06-02 18:54:01 +0000
committerChris Lattner <sabre@nondot.org>2006-06-02 18:54:01 +0000
commitd9477607dc44ca92c6fde88706c219c21fddc96b (patch)
treecdcda0b610f6681e39d5cb3ea20a8baa8d8f8111
parent191b0ba97eedcd55d6fc8616d9c391ddfcbc4f4e (diff)
downloadexternal_llvm-d9477607dc44ca92c6fde88706c219c21fddc96b.zip
external_llvm-d9477607dc44ca92c6fde88706c219c21fddc96b.tar.gz
external_llvm-d9477607dc44ca92c6fde88706c219c21fddc96b.tar.bz2
Add mingw support, patch contributed by Anton
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28661 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Target/CBackend/CBackend.cpp2
-rw-r--r--lib/Target/CBackend/Writer.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/Target/CBackend/CBackend.cpp b/lib/Target/CBackend/CBackend.cpp
index 6786780..36336b3 100644
--- a/lib/Target/CBackend/CBackend.cpp
+++ b/lib/Target/CBackend/CBackend.cpp
@@ -833,7 +833,7 @@ 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__)\n"
+ << "#if defined(__CYGWIN__) || defined(__MINGW32__)\n"
<< "extern void *_alloca(unsigned long);\n"
<< "#define alloca(x) _alloca(x)\n"
<< "#elif defined(__APPLE__)\n"
diff --git a/lib/Target/CBackend/Writer.cpp b/lib/Target/CBackend/Writer.cpp
index 6786780..36336b3 100644
--- a/lib/Target/CBackend/Writer.cpp
+++ b/lib/Target/CBackend/Writer.cpp
@@ -833,7 +833,7 @@ 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__)\n"
+ << "#if defined(__CYGWIN__) || defined(__MINGW32__)\n"
<< "extern void *_alloca(unsigned long);\n"
<< "#define alloca(x) _alloca(x)\n"
<< "#elif defined(__APPLE__)\n"