Fix alloca use on mingw.

This commit is contained in:
Pierre-Antoine Lacaze
2012-01-09 10:19:09 +01:00
parent 54e8e8022b
commit da9200fcee
2 changed files with 6 additions and 1 deletions

View File

@@ -79,7 +79,9 @@
#include <alloca.h>
#elif defined(ISPC_IS_WINDOWS)
#include <malloc.h>
#define alloca _alloca
#ifndef __MINGW32__
#define alloca _alloca
#endif
#endif // ISPC_IS_WINDOWS
static llvm::Pass *CreateIntrinsicsOptPass();

View File

@@ -39,6 +39,9 @@
#include "module.h"
#ifdef ISPC_IS_WINDOWS
#include <shlwapi.h>
#ifdef __MINGW32__
#include <malloc.h> // for alloca()
#endif
#else
#include <alloca.h>
#endif