aboutsummaryrefslogtreecommitdiff
path: root/lib/Target/CBackend/Writer.cpp
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 /lib/Target/CBackend/Writer.cpp
parent191b0ba97eedcd55d6fc8616d9c391ddfcbc4f4e (diff)
Add mingw support, patch contributed by Anton
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28661 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/CBackend/Writer.cpp')
-rw-r--r--lib/Target/CBackend/Writer.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Target/CBackend/Writer.cpp b/lib/Target/CBackend/Writer.cpp
index 6786780d23..36336b38d5 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"