diff options
Diffstat (limited to 'include/Support')
-rw-r--r-- | include/Support/Alloca.h | 18 | ||||
-rw-r--r-- | include/Support/Annotation.h | 2 | ||||
-rw-r--r-- | include/Support/BitSetVector.h | 1 | ||||
-rw-r--r-- | include/Support/Casting.h | 2 | ||||
-rw-r--r-- | include/Support/CommandLine.h | 1 | ||||
-rw-r--r-- | include/Support/DataTypes.h | 58 | ||||
-rw-r--r-- | include/Support/SCCIterator.h | 1 | ||||
-rw-r--r-- | include/Support/Signals.h | 5 | ||||
-rw-r--r-- | include/Support/Timer.h | 1 | ||||
-rw-r--r-- | include/Support/Tree.h | 1 | ||||
-rw-r--r-- | include/Support/hash_map | 22 | ||||
-rw-r--r-- | include/Support/hash_set | 22 | ||||
-rw-r--r-- | include/Support/ilist | 1 | ||||
-rw-r--r-- | include/Support/iterator | 5 | ||||
-rw-r--r-- | include/Support/slist | 17 |
15 files changed, 51 insertions, 106 deletions
diff --git a/include/Support/Alloca.h b/include/Support/Alloca.h index a56e874c75..ea4e41c3a0 100644 --- a/include/Support/Alloca.h +++ b/include/Support/Alloca.h @@ -9,22 +9,6 @@ #ifndef SUPPORT_ALLOCA_H #define SUPPORT_ALLOCA_H -// TODO: Determine HAVE_ALLOCA_H based on autoconf results. -// The following method is too brittle. -#if defined(HAVE_ALLOCA_H) -#undef HAVE_ALLOCA_H -#endif - -#if defined(__linux__) -#define HAVE_ALLOCA_H 1 -#elif defined(__sparc__) -#define HAVE_ALLOCA_H 1 -#elif defined(__FreeBSD__) -// not defined here -#endif - -#if HAVE_ALLOCA_H -#include <alloca.h> -#endif +#include "Config/alloca.h" #endif /* SUPPORT_ALLOCA_H */ diff --git a/include/Support/Annotation.h b/include/Support/Annotation.h index 8dbad760d7..9642f03c80 100644 --- a/include/Support/Annotation.h +++ b/include/Support/Annotation.h @@ -16,7 +16,7 @@ #define SUPPORT_ANNOTATION_H #include <string> -#include <assert.h> + class AnnotationID; class Annotation; class Annotable; diff --git a/include/Support/BitSetVector.h b/include/Support/BitSetVector.h index 898ea53f65..cdcd52d948 100644 --- a/include/Support/BitSetVector.h +++ b/include/Support/BitSetVector.h @@ -24,7 +24,6 @@ #include <vector> #include <functional> #include <iostream> -#include <assert.h> class BitSetVector { enum { BITSET_WORDSIZE = sizeof(long)*8 }; diff --git a/include/Support/Casting.h b/include/Support/Casting.h index 491d165083..476d3ae681 100644 --- a/include/Support/Casting.h +++ b/include/Support/Casting.h @@ -8,8 +8,6 @@ #ifndef SUPPORT_CASTING_H #define SUPPORT_CASTING_H -#include <assert.h> - //===----------------------------------------------------------------------===// // isa<x> Support Templates //===----------------------------------------------------------------------===// diff --git a/include/Support/CommandLine.h b/include/Support/CommandLine.h index 97b223c738..eb1aa18a0b 100644 --- a/include/Support/CommandLine.h +++ b/include/Support/CommandLine.h @@ -18,7 +18,6 @@ #include <utility> #include <cstdarg> #include "boost/type_traits/object_traits.hpp" -#include <assert.h> /// cl Namespace - This namespace contains all of the command line option /// processing machinery. It is intentionally a short name to make qualified diff --git a/include/Support/DataTypes.h b/include/Support/DataTypes.h index 80543c6140..2f6724c4fb 100644 --- a/include/Support/DataTypes.h +++ b/include/Support/DataTypes.h @@ -13,65 +13,19 @@ // //===----------------------------------------------------------------------===// -// TODO: This file sucks. Not only does it not work, but this stuff should be -// autoconfiscated anyways. Major FIXME - #ifndef SUPPORT_DATATYPES_H #define SUPPORT_DATATYPES_H -#define __STDC_LIMIT_MACROS 1 -#include <inttypes.h> - -#ifdef __linux__ -# include <endian.h> -# if BYTE_ORDER == LITTLE_ENDIAN -# undef BIG_ENDIAN -# else -# undef LITTLE_ENDIAN -# endif -#endif - -#ifdef __FreeBSD__ -# include <machine/endian.h> -# if _BYTE_ORDER == _LITTLE_ENDIAN -# ifndef LITTLE_ENDIAN -# define LITTLE_ENDIAN 1 -# endif -# ifdef BIG_ENDIAN -# undef BIG_ENDIAN -# endif -# else -# ifndef BIG_ENDIAN -# define BIG_ENDIAN 1 -# endif -# ifdef LITTLE_ENDIAN -# undef LITTLE_ENDIAN -# endif -# endif -#endif +#include "Config/config.h" -#ifdef __sparc__ -# include <sys/types.h> -# ifdef _LITTLE_ENDIAN -# define LITTLE_ENDIAN 1 -# else -# define BIG_ENDIAN 1 -# endif -#endif +#define __STDC_LIMIT_MACROS 1 -// -// Convert the information from the header files into our own local -// endian macros. We do this because various strange systems define both -// BIG_ENDIAN and LITTLE_ENDIAN, and we don't want to conflict with them. -// -// Don't worry; once we introduce autoconf, this will look a lot nicer. -// -#ifdef LITTLE_ENDIAN -#define ENDIAN_LITTLE +#ifdef HAVE_INTTYPES_H +#include <inttypes.h> #endif -#ifdef BIG_ENDIAN -#define ENDIAN_BIG +#ifdef HAVE_SYS_TYPES_H +#include <sys/types.h> #endif #if (defined(ENDIAN_LITTLE) && defined(ENDIAN_BIG)) diff --git a/include/Support/SCCIterator.h b/include/Support/SCCIterator.h index a06e186a90..4de80f4a84 100644 --- a/include/Support/SCCIterator.h +++ b/include/Support/SCCIterator.h @@ -21,7 +21,6 @@ #include <vector> #include <stack> #include <map> -#include <assert.h> //-------------------------------------------------------------------------- // class SCC : A simple representation of an SCC in a generic Graph. diff --git a/include/Support/Signals.h b/include/Support/Signals.h index 1445bd461d..86e5f910ba 100644 --- a/include/Support/Signals.h +++ b/include/Support/Signals.h @@ -10,6 +10,11 @@ #include <string> +// +// This will include the signal handler return type. +// +#include "Config/config.h" + // RemoveFileOnSignal - This function registers signal handlers to ensure that // if a signal gets delivered that the named file is removed. // diff --git a/include/Support/Timer.h b/include/Support/Timer.h index 5cacadaf1c..c36006f25d 100644 --- a/include/Support/Timer.h +++ b/include/Support/Timer.h @@ -28,7 +28,6 @@ #include <string> #include <vector> #include <iosfwd> -#include <assert.h> class TimerGroup; diff --git a/include/Support/Tree.h b/include/Support/Tree.h index 7a3e9c4350..928c99bca9 100644 --- a/include/Support/Tree.h +++ b/include/Support/Tree.h @@ -9,7 +9,6 @@ #define SUPPORT_TREE_H #include <vector> -#include <assert.h> template<class ConcreteTreeNode, class Payload> class Tree { diff --git a/include/Support/hash_map b/include/Support/hash_map index 3c50e4b13f..ce4c42f6ab 100644 --- a/include/Support/hash_map +++ b/include/Support/hash_map @@ -17,23 +17,25 @@ // 3.0.4 std ext/hash_map // 3.1 __gnu_cxx ext/hash_map // -#if __GNUC__ == 3 -#include <ext/hash_map> -#ifndef HASH_NAMESPACE -#if __GNUC_MINOR__ == 0 -#define HASH_NAMESPACE std -#else +#include "Config/config.h" + +#ifdef HAVE_GNU_EXT_HASH_MAP + +#include <ext/hash_map> #define HASH_NAMESPACE __gnu_cxx -#endif -#endif #else -#include <hash_map> -#ifndef HASH_NAMESPACE +#ifdef HAVE_STD_EXT_HASH_MAP +#include <ext/hash_map> #define HASH_NAMESPACE std + +#else +#include <hash_map> +#define HASH_NAMESPACE #endif + #endif using HASH_NAMESPACE::hash_map; diff --git a/include/Support/hash_set b/include/Support/hash_set index 72c20ce235..045083c8cd 100644 --- a/include/Support/hash_set +++ b/include/Support/hash_set @@ -17,23 +17,25 @@ // 3.0.4 std ext/hash_set // 3.1 __gnu_cxx ext/hash_set // -#if __GNUC__==3 -#include <ext/hash_set> -#ifndef HASH_NAMESPACE -#if __GNUC_MINOR__ == 0 -#define HASH_NAMESPACE std -#else +#include "Config/config.h" + +#ifdef HAVE_GNU_EXT_HASH_SET + +#include <ext/hash_set> #define HASH_NAMESPACE __gnu_cxx -#endif -#endif #else -#include <hash_set> -#ifndef HASH_NAMESPACE +#ifdef HAVE_STD_EXT_HASH_SET +#include <ext/hash_set> #define HASH_NAMESPACE std + +#else +#include <hash_set> +#define HASH_NAMESPACE #endif + #endif using HASH_NAMESPACE::hash_set; diff --git a/include/Support/ilist b/include/Support/ilist index ce906ba559..83a1fe670e 100644 --- a/include/Support/ilist +++ b/include/Support/ilist @@ -31,7 +31,6 @@ #ifndef SUPPORT_ILIST #define SUPPORT_ILIST -#include <assert.h> #include <algorithm> #include <Support/iterator> diff --git a/include/Support/iterator b/include/Support/iterator index 444f5ab152..d0c7b511f0 100644 --- a/include/Support/iterator +++ b/include/Support/iterator @@ -19,9 +19,11 @@ #ifndef SUPPORT_ITERATOR #define SUPPORT_ITERATOR +#include "Config/config.h" + #include <iterator> -#if __GNUC__ == 3 +#ifdef HAVE_STD_ITERATOR // Define stupid wrappers around std::iterator... template<class Ty, class PtrDiffTy> @@ -35,6 +37,7 @@ struct forward_iterator }; #else + // Just use bidirectional_iterator directly. using std::bidirectional_iterator; using std::forward_iterator; diff --git a/include/Support/slist b/include/Support/slist index 71670e6af2..31c5ce809b 100644 --- a/include/Support/slist +++ b/include/Support/slist @@ -10,6 +10,8 @@ #ifndef SUPPORT_SLIST #define SUPPORT_SLIST +#include "Config/config.h" + // Compiler Support Matrix // // Version Namespace Header File @@ -17,18 +19,19 @@ // 3.0.4 std ext/slist // 3.1 __gnu_cxx ext/slist // -#if __GNUC__ == 3 + +#ifdef HAVE_EXT_SLIST #include <ext/slist> +#else +#include <slist> +#endif -#if __GNUC_MINOR__ == 0 +#if HAVE_EXT_SLIST == std using std::slist; -#else -using __gnu_cxx::slist; #endif -#else -// GCC 2.x -#include <slist> +#if HAVE_EXT_SLIST == gnu +using __gnu_cxx::slist; #endif #endif |