[llvm-commits] CVS: llvm/include/Config/alloca.h
Chris Lattner
lattner at cs.uiuc.edu
Fri Jun 4 14:30:01 PDT 2004
Changes in directory llvm/include/Config:
alloca.h updated: 1.3 -> 1.4
---
Log message:
Make this work on VC++, pull the HAVE_ALLOCA_H case out instead of duplicating
it. This code can probably be dramatically simplified, as I suspect that the
pragma and other stuff is not needed with C++ compilers.
---
Diffs of the changes: (+12 -16)
Index: llvm/include/Config/alloca.h
diff -u llvm/include/Config/alloca.h:1.3 llvm/include/Config/alloca.h:1.4
--- llvm/include/Config/alloca.h:1.3 Mon Oct 20 15:11:34 2003
+++ llvm/include/Config/alloca.h Fri Jun 4 14:25:50 2004
@@ -23,27 +23,23 @@
* 2) If alloca.h cannot be found, then try stdlib.h. Some platforms
* (notably FreeBSD) defined alloca() there.
*/
-#ifndef __GNUC__
-# ifdef HAVE_ALLOCA_H
-# include <alloca.h>
+#ifdef _MSC_VER
+/* noop on Visual C++ */
+#elif defined(HAVE_ALLOCA_H)
+#include <alloca.h>
+#elif !defined(__GNUC__)
+# ifdef _AIX
+ # pragma alloca
# else
-# ifdef _AIX
- # pragma alloca
-# else
-# ifndef alloca
- char * alloca ();
-# endif
+# ifndef alloca
+ char * alloca ();
# endif
# endif
#else
-# ifdef HAVE_ALLOCA_H
-# include <alloca.h>
+# ifdef HAVE_STDLIB_H
+# include <stdlib.h>
# else
-# ifdef HAVE_STDLIB_H
-# include <stdlib.h>
-# else
-# error "The function alloca() is required but not found!"
-# endif
+# error "The function alloca() is required but not found!"
# endif
#endif
More information about the llvm-commits
mailing list