Fix C Backend to generate code that works with Microsoft C for the benefit of

front ends that do not depend on the GCC runtime (someday...).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35441 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Jeff Cohen 2007-03-28 23:08:37 +00:00
parent 3c8dfcd53d
commit ab47895c6b

View File

@ -1293,7 +1293,10 @@ static void generateCompilerSpecificCode(std::ostream& Out) {
<< "#define alloca(x) __builtin_alloca(x)\n"
<< "#elif defined(__FreeBSD__) || defined(__OpenBSD__)\n"
<< "#define alloca(x) __builtin_alloca(x)\n"
<< "#elif !defined(_MSC_VER)\n"
<< "#elif defined(_MSC_VER)\n"
<< "#define inline\n"
<< "#define alloca(x) _alloca(x)\n"
<< "#else\n"
<< "#include <alloca.h>\n"
<< "#endif\n\n";