b52474735fe4e74a23c033406e89f324be946f49
[oota-llvm.git] / include / Support / hash_map
1 //===-- Support/hash_map - "Portable" wrapper around hash_map ---*- C++ -*-===//
2 //
3 // This file provides a wrapper around the mysterious <hash_map> header file
4 // that seems to move around between GCC releases into and out of namespaces at
5 // will.  #including this header will cause hash_map to be available in the
6 // global namespace.
7 //
8 //===----------------------------------------------------------------------===//
9
10 #ifndef SUPPORT_HASHMAP_H
11 #define SUPPORT_HASHMAP_H
12
13 // Compiler Support Matrix
14 //
15 // Version   Namespace   Header File
16 //  2.95.x       ::        hash_map
17 //  3.0.4       std      ext/hash_map
18 //  3.1      __gnu_cxx   ext/hash_map
19 //
20 #if __GNUC__ == 3
21 #include <ext/hash_map>
22
23 #ifndef HASH_NAMESPACE
24 #if __GNUC_MINOR__ == 0
25 #define HASH_NAMESPACE std
26 #else
27 #define HASH_NAMESPACE __gnu_cxx
28 #endif
29 #endif
30
31 #else
32
33 #include <hash_map>
34 #ifndef HASH_NAMESPACE
35 #define HASH_NAMESPACE std
36 #endif
37 #endif
38
39 using HASH_NAMESPACE::hash_map;
40 using HASH_NAMESPACE::hash;
41
42 #endif