Made error message more comprehensible.
[oota-llvm.git] / include / Support / hash_set
1 //===-- Support/hash_set - "Portable" wrapper around hash_set ---*- C++ -*-===//
2 // vim:ft=cpp
3 //
4 // This file provides a wrapper around the mysterious <hash_set> header file
5 // that seems to move around between GCC releases into and out of namespaces at
6 // will.  #including this header will cause hash_set to be available in the
7 // global namespace.
8 //
9 //===----------------------------------------------------------------------===//
10
11 #ifndef SUPPORT_HASH_SET
12 #define SUPPORT_HASH_SET
13
14 // Compiler Support Matrix
15 //
16 // Version   Namespace   Header File
17 //  2.95.x       ::        hash_set
18 //  3.0.4       std      ext/hash_set
19 //  3.1      __gnu_cxx   ext/hash_set
20 //
21
22 #include "Config/config.h"
23
24 #ifdef HAVE_GNU_EXT_HASH_SET
25
26 // This is for GCC-3.1+ which puts hashset in ext/hash_set
27 #include <ext/hash_set>
28 #define HASH_NAMESPACE __gnu_cxx
29
30 #else
31
32 // This is for GCC-3.0.x which puts hashmap in the `ext' directory.
33 #ifdef HAVE_STD_EXT_HASH_SET
34 #include <ext/hash_set>
35 #define HASH_NAMESPACE std
36
37 #else
38 // This handles older, pre-3.0 GCC which do not have the extentions in the `ext'
39 // directory, and ignore the `std' namespace.
40 #include <hash_set>
41 #define HASH_NAMESPACE std
42 #endif
43
44 #endif
45
46 using HASH_NAMESPACE::hash_set;
47 using HASH_NAMESPACE::hash;
48
49 // Include vector because ext/hash_set includes stl_vector.h and leaves
50 // out specializations like stl_bvector.h, causing link conflicts.
51 #include <vector>
52
53 #include <Support/HashExtras.h>
54
55 #endif