Support iteration over constant instructions
[oota-llvm.git] / include / Config / alloca.h
1 /*
2  *                     The LLVM Compiler Infrastructure
3  *
4  * This file was developed by the LLVM research group and is distributed under
5  * the University of Illinois Open Source License. See LICENSE.TXT for details.
6  * 
7  ******************************************************************************
8  *
9  * Description:
10  *      This header file includes the infamous alloc.h header file if the
11  *      autoconf system has found it.  It hides all of the autoconf details
12  *      from the rest of the application source code.
13  */
14
15 #ifndef _CONFIG_ALLOC_H
16 #define _CONFIG_ALLOC_H
17
18 #include "Config/config.h"
19
20 /*
21  * This is a modified version of that suggested by the Autoconf manual.
22  *      1) The #pragma is indented so that pre-ANSI C compilers ignore it.
23  *      2) If alloca.h cannot be found, then try stdlib.h.  Some platforms
24  *         (notably FreeBSD) defined alloca() there.
25  */
26 #ifndef __GNUC__
27 #       ifdef HAVE_ALLOCA_H
28 #               include <alloca.h>
29 #       else
30 #               ifdef _AIX
31  #                      pragma alloca
32 #               else
33 #                       ifndef alloca
34                                 char * alloca ();
35 #                       endif
36 #               endif
37 #       endif
38 #else
39 #       ifdef HAVE_ALLOCA_H
40 #               include <alloca.h>
41 #       else
42 #               ifdef HAVE_STDLIB_H
43 #                       include <stdlib.h>
44 #               else
45 #                       error "The function alloca() is required but not found!"
46 #               endif
47 #       endif
48 #endif
49
50 #endif
51