aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2003-11-12 22:45:14 +0000
committerChris Lattner <sabre@nondot.org>2003-11-12 22:45:14 +0000
commite94e0edc3e6775159d37557765275a8a3887c481 (patch)
tree523ea31f2aa3700fc4198cc5c366cc352cab2a77
parent811ce9f4ca6ae2a33631b1043e43030062d3f90c (diff)
Fix faulty namespacification
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9943 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/Support/MallocAllocator.h11
-rw-r--r--include/llvm/Support/MallocAllocator.h11
2 files changed, 14 insertions, 8 deletions
diff --git a/include/Support/MallocAllocator.h b/include/Support/MallocAllocator.h
index 24f1a43c8d..022953df93 100644
--- a/include/Support/MallocAllocator.h
+++ b/include/Support/MallocAllocator.h
@@ -23,6 +23,8 @@
#include <cstdlib>
#include <memory>
+namespace llvm {
+
template<typename T>
struct MallocAllocator {
typedef size_t size_type;
@@ -68,14 +70,15 @@ template<typename T>
inline bool operator!=(const MallocAllocator<T>&, const MallocAllocator<T>&) {
return false;
}
+} // End llvm namespace
namespace std {
template<typename Type, typename Type2>
- struct _Alloc_traits<Type, ::MallocAllocator<Type2> > {
+ struct _Alloc_traits<Type, ::llvm::MallocAllocator<Type2> > {
static const bool _S_instanceless = true;
- typedef ::MallocAllocator<Type> base_alloc_type;
- typedef ::MallocAllocator<Type> _Alloc_type;
- typedef ::MallocAllocator<Type> allocator_type;
+ typedef ::llvm::MallocAllocator<Type> base_alloc_type;
+ typedef ::llvm::MallocAllocator<Type> _Alloc_type;
+ typedef ::llvm::MallocAllocator<Type> allocator_type;
};
}
diff --git a/include/llvm/Support/MallocAllocator.h b/include/llvm/Support/MallocAllocator.h
index 24f1a43c8d..022953df93 100644
--- a/include/llvm/Support/MallocAllocator.h
+++ b/include/llvm/Support/MallocAllocator.h
@@ -23,6 +23,8 @@
#include <cstdlib>
#include <memory>
+namespace llvm {
+
template<typename T>
struct MallocAllocator {
typedef size_t size_type;
@@ -68,14 +70,15 @@ template<typename T>
inline bool operator!=(const MallocAllocator<T>&, const MallocAllocator<T>&) {
return false;
}
+} // End llvm namespace
namespace std {
template<typename Type, typename Type2>
- struct _Alloc_traits<Type, ::MallocAllocator<Type2> > {
+ struct _Alloc_traits<Type, ::llvm::MallocAllocator<Type2> > {
static const bool _S_instanceless = true;
- typedef ::MallocAllocator<Type> base_alloc_type;
- typedef ::MallocAllocator<Type> _Alloc_type;
- typedef ::MallocAllocator<Type> allocator_type;
+ typedef ::llvm::MallocAllocator<Type> base_alloc_type;
+ typedef ::llvm::MallocAllocator<Type> _Alloc_type;
+ typedef ::llvm::MallocAllocator<Type> allocator_type;
};
}