summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/CBackend
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
commit8fd103661261657f80aa38ddc7730e4635f699ad (patch)
tree0dd5f2e50ec4ff0769090e745912786af2829dcd /llvm/lib/Target/CBackend
parent02e0b4ddb775bd6c7b61c98afe4a05c02b7880ff (diff)
downloadbcm5719-llvm-8fd103661261657f80aa38ddc7730e4635f699ad.tar.gz
bcm5719-llvm-8fd103661261657f80aa38ddc7730e4635f699ad.zip
Add mingw support, patch contributed by Anton
llvm-svn: 28661
Diffstat (limited to 'llvm/lib/Target/CBackend')
-rw-r--r--llvm/lib/Target/CBackend/Writer.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Target/CBackend/Writer.cpp b/llvm/lib/Target/CBackend/Writer.cpp
index 6786780d23e..36336b38d58 100644
--- a/llvm/lib/Target/CBackend/Writer.cpp
+++ b/llvm/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"
OpenPOWER on IntegriCloud