[llvm-commits] CVS: llvm/include/llvm/ADT/hash_map.in hash_set.in iterator.in

Jeff Cohen jeffc at jolt-lang.org
Wed Oct 26 07:49:10 PDT 2005



Changes in directory llvm/include/llvm/ADT:

hash_map.in updated: 1.9 -> 1.10
hash_set.in updated: 1.6 -> 1.7
iterator.in updated: 1.3 -> 1.4
---
Log message:

Eliminate use of sed in Visual Studio builds.

---
Diffs of the changes:  (+27 -7)

 hash_map.in |   18 +++++++++++++-----
 hash_set.in |   10 ++++++++--
 iterator.in |    6 ++++++
 3 files changed, 27 insertions(+), 7 deletions(-)


Index: llvm/include/llvm/ADT/hash_map.in
diff -u llvm/include/llvm/ADT/hash_map.in:1.9 llvm/include/llvm/ADT/hash_map.in:1.10
--- llvm/include/llvm/ADT/hash_map.in:1.9	Wed Aug 24 09:03:07 2005
+++ llvm/include/llvm/ADT/hash_map.in	Wed Oct 26 09:48:53 2005
@@ -24,7 +24,7 @@
 //  3.0.4       std      ext/hash_map
 //  3.1      __gnu_cxx   ext/hash_map
 //  HP aCC6     std      stdex/rw/hashm*ap.h
-//
+//  MS VC++    stdext      hash_map
 
 #undef HAVE_GNU_EXT_HASH_MAP
 #undef HAVE_STD_EXT_HASH_MAP
@@ -63,6 +63,14 @@
 #  define HASH_NAMESPACE std
 # endif
 
+// Support Microsoft VC++.
+#elif defined(_MSC_VER)
+# include <hash_map>
+# ifndef HASH_NAMESPACE
+#  define HASH_NAMESPACE stdext
+   using std::_Distance;
+# endif
+
 // Give a warning if we couldn't find it, instead of (or in addition to)
 // randomly doing something dumb.
 #else
@@ -100,10 +108,6 @@
 } // end HASH_NAMESPACE;
 #endif
 
-using HASH_NAMESPACE::hash_map;
-using HASH_NAMESPACE::hash_multimap;
-using HASH_NAMESPACE::hash;
-
 // Include vector because ext/hash_map includes stl_vector.h and leaves
 // out specializations like stl_bvector.h, causing link conflicts.
 #include <vector>
@@ -137,6 +141,10 @@
 
 #endif
 
+using HASH_NAMESPACE::hash_map;
+using HASH_NAMESPACE::hash_multimap;
+using HASH_NAMESPACE::hash;
+
 #include "llvm/ADT/HashExtras.h"
 
 #endif


Index: llvm/include/llvm/ADT/hash_set.in
diff -u llvm/include/llvm/ADT/hash_set.in:1.6 llvm/include/llvm/ADT/hash_set.in:1.7
--- llvm/include/llvm/ADT/hash_set.in:1.6	Wed Aug 24 05:57:30 2005
+++ llvm/include/llvm/ADT/hash_set.in	Wed Oct 26 09:48:53 2005
@@ -25,7 +25,7 @@
 //  3.0.4       std      ext/hash_set
 //  3.1      __gnu_cxx   ext/hash_set
 //  HP aCC6     std      stdex/rw/hashset.h
-//
+//  MS VC++    stdext      hash_map
 
 #undef HAVE_GNU_EXT_HASH_SET
 #undef HAVE_STD_EXT_HASH_SET
@@ -64,6 +64,13 @@
 #  define HASH_NAMESPACE std
 # endif
 
+// Support Microsoft VC++.
+#elif defined(_MSC_VER)
+# include <hash_set>
+# ifndef HASH_NAMESPACE
+#  define HASH_NAMESPACE stdext
+# endif
+
 // Give a warning if we couldn't find it, instead of (or in addition to)
 // randomly doing something dumb.
 #else
@@ -94,7 +101,6 @@
 #endif
 
 using HASH_NAMESPACE::hash_set;
-using HASH_NAMESPACE::hash;
 
 // Include vector because ext/hash_set includes stl_vector.h and leaves
 // out specializations like stl_bvector.h, causing link conflicts.


Index: llvm/include/llvm/ADT/iterator.in
diff -u llvm/include/llvm/ADT/iterator.in:1.3 llvm/include/llvm/ADT/iterator.in:1.4
--- llvm/include/llvm/ADT/iterator.in:1.3	Fri Sep 24 16:19:05 2004
+++ llvm/include/llvm/ADT/iterator.in	Wed Oct 26 09:48:53 2005
@@ -34,6 +34,12 @@
 #undef HAVE_STD_ITERATOR
 #undef HAVE_FWD_ITERATOR
 
+#ifdef _MSC_VER
+#  define HAVE_BI_ITERATOR 0
+#  define HAVE_STD_ITERATOR 1
+#  define HAVE_FWD_ITERATOR 0
+#endif
+
 #if !HAVE_BI_ITERATOR
 # if HAVE_STD_ITERATOR
 /// If the bidirectional iterator is not defined, we attempt to define it in






More information about the llvm-commits mailing list