[llvm-commits] CVS: llvm/include/Support/Alloca.h Annotation.h BitSetVector.h Casting.h CommandLine.h DataTypes.h Signals.h TarjanSCCIterator.h Timer.h Tree.h hash_map hash_set ilist iterator slist

John Criswell criswell at cs.uiuc.edu
Mon Jun 30 17:02:15 PDT 2003


Changes in directory llvm/include/Support:

Alloca.h updated: 1.2 -> 1.3
Annotation.h updated: 1.8 -> 1.9
BitSetVector.h updated: 1.7 -> 1.8
Casting.h updated: 1.5 -> 1.6
CommandLine.h updated: 1.15 -> 1.16
DataTypes.h updated: 1.11 -> 1.12
Signals.h updated: 1.2 -> 1.3
TarjanSCCIterator.h updated: 1.7 -> 1.8
Timer.h updated: 1.7 -> 1.8
Tree.h updated: 1.5 -> 1.6
hash_map updated: 1.7 -> 1.8
hash_set updated: 1.7 -> 1.8
ilist updated: 1.7 -> 1.8
iterator updated: 1.3 -> 1.4
slist updated: 1.3 -> 1.4

---
Log message:

Merged in autoconf branch.  This provides configuration via the autoconf
system.


---
Diffs of the changes:

Index: llvm/include/Support/Alloca.h
diff -u llvm/include/Support/Alloca.h:1.2 llvm/include/Support/Alloca.h:1.3
--- llvm/include/Support/Alloca.h:1.2	Mon Jun 16 19:35:55 2003
+++ llvm/include/Support/Alloca.h	Mon Jun 30 16:58:23 2003
@@ -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 */


Index: llvm/include/Support/Annotation.h
diff -u llvm/include/Support/Annotation.h:1.8 llvm/include/Support/Annotation.h:1.9
--- llvm/include/Support/Annotation.h:1.8	Wed Jun 11 09:01:21 2003
+++ llvm/include/Support/Annotation.h	Mon Jun 30 16:58:23 2003
@@ -16,7 +16,7 @@
 #define SUPPORT_ANNOTATION_H
 
 #include <string>
-#include <assert.h>
+
 class AnnotationID;
 class Annotation;
 class Annotable;


Index: llvm/include/Support/BitSetVector.h
diff -u llvm/include/Support/BitSetVector.h:1.7 llvm/include/Support/BitSetVector.h:1.8
--- llvm/include/Support/BitSetVector.h:1.7	Sat Jun 21 22:09:10 2003
+++ llvm/include/Support/BitSetVector.h	Mon Jun 30 16:58:23 2003
@@ -24,7 +24,6 @@
 #include <vector>
 #include <functional>
 #include <iostream>
-#include <assert.h>
 
 class BitSetVector {
   enum { BITSET_WORDSIZE = sizeof(long)*8 };


Index: llvm/include/Support/Casting.h
diff -u llvm/include/Support/Casting.h:1.5 llvm/include/Support/Casting.h:1.6
--- llvm/include/Support/Casting.h:1.5	Thu May 29 10:07:48 2003
+++ llvm/include/Support/Casting.h	Mon Jun 30 16:58:23 2003
@@ -8,8 +8,6 @@
 #ifndef SUPPORT_CASTING_H
 #define SUPPORT_CASTING_H
 
-#include <assert.h>
-
 //===----------------------------------------------------------------------===//
 //                          isa<x> Support Templates
 //===----------------------------------------------------------------------===//


Index: llvm/include/Support/CommandLine.h
diff -u llvm/include/Support/CommandLine.h:1.15 llvm/include/Support/CommandLine.h:1.16
--- llvm/include/Support/CommandLine.h:1.15	Sat Jun 28 10:47:18 2003
+++ llvm/include/Support/CommandLine.h	Mon Jun 30 16:58:23 2003
@@ -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


Index: llvm/include/Support/DataTypes.h
diff -u llvm/include/Support/DataTypes.h:1.11 llvm/include/Support/DataTypes.h:1.12
--- llvm/include/Support/DataTypes.h:1.11	Mon Jun 16 19:35:55 2003
+++ llvm/include/Support/DataTypes.h	Mon Jun 30 16:58:23 2003
@@ -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))


Index: llvm/include/Support/Signals.h
diff -u llvm/include/Support/Signals.h:1.2 llvm/include/Support/Signals.h:1.3
--- llvm/include/Support/Signals.h:1.2	Wed Dec 11 21:43:30 2002
+++ llvm/include/Support/Signals.h	Mon Jun 30 16:58:23 2003
@@ -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.
 //


Index: llvm/include/Support/TarjanSCCIterator.h
diff -u llvm/include/Support/TarjanSCCIterator.h:1.7 llvm/include/Support/TarjanSCCIterator.h:1.8
--- llvm/include/Support/TarjanSCCIterator.h:1.7	Sat Jun 21 22:08:05 2003
+++ llvm/include/Support/TarjanSCCIterator.h	Mon Jun 30 16:58:23 2003
@@ -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.


Index: llvm/include/Support/Timer.h
diff -u llvm/include/Support/Timer.h:1.7 llvm/include/Support/Timer.h:1.8
--- llvm/include/Support/Timer.h:1.7	Sat Jun 21 22:08:05 2003
+++ llvm/include/Support/Timer.h	Mon Jun 30 16:58:23 2003
@@ -28,7 +28,6 @@
 #include <string>
 #include <vector>
 #include <iosfwd>
-#include <assert.h>
 
 class TimerGroup;
 


Index: llvm/include/Support/Tree.h
diff -u llvm/include/Support/Tree.h:1.5 llvm/include/Support/Tree.h:1.6
--- llvm/include/Support/Tree.h:1.5	Sat Jun 21 22:08:05 2003
+++ llvm/include/Support/Tree.h	Mon Jun 30 16:58:23 2003
@@ -9,7 +9,6 @@
 #define SUPPORT_TREE_H
 
 #include <vector>
-#include <assert.h>
 
 template<class ConcreteTreeNode, class Payload>
 class Tree {


Index: llvm/include/Support/hash_map
diff -u llvm/include/Support/hash_map:1.7 llvm/include/Support/hash_map:1.8
--- llvm/include/Support/hash_map:1.7	Mon Jun 16 19:35:55 2003
+++ llvm/include/Support/hash_map	Mon Jun 30 16:58:24 2003
@@ -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;


Index: llvm/include/Support/hash_set
diff -u llvm/include/Support/hash_set:1.7 llvm/include/Support/hash_set:1.8
--- llvm/include/Support/hash_set:1.7	Mon Jun 16 19:35:55 2003
+++ llvm/include/Support/hash_set	Mon Jun 30 16:58:24 2003
@@ -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;


Index: llvm/include/Support/ilist
diff -u llvm/include/Support/ilist:1.7 llvm/include/Support/ilist:1.8
--- llvm/include/Support/ilist:1.7	Mon Jun 16 19:35:55 2003
+++ llvm/include/Support/ilist	Mon Jun 30 16:58:24 2003
@@ -31,7 +31,6 @@
 #ifndef SUPPORT_ILIST
 #define SUPPORT_ILIST
 
-#include <assert.h>
 #include <algorithm>
 #include <Support/iterator>
 


Index: llvm/include/Support/iterator
diff -u llvm/include/Support/iterator:1.3 llvm/include/Support/iterator:1.4
--- llvm/include/Support/iterator:1.3	Mon Jun 16 19:35:55 2003
+++ llvm/include/Support/iterator	Mon Jun 30 16:58:24 2003
@@ -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 @@
 };
 
 #else
+
 // Just use bidirectional_iterator directly.
 using std::bidirectional_iterator;
 using std::forward_iterator;


Index: llvm/include/Support/slist
diff -u llvm/include/Support/slist:1.3 llvm/include/Support/slist:1.4
--- llvm/include/Support/slist:1.3	Mon Jun 16 19:35:55 2003
+++ llvm/include/Support/slist	Mon Jun 30 16:58:24 2003
@@ -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





More information about the llvm-commits mailing list