Only add the _Alloc_traits specialization in if we're compiling for
authorJohn Criswell <criswell@uiuc.edu>
Thu, 28 Oct 2004 17:31:46 +0000 (17:31 +0000)
committerJohn Criswell <criswell@uiuc.edu>
Thu, 28 Oct 2004 17:31:46 +0000 (17:31 +0000)
Linux and not compiling for Sparc.
This is still probably not correct, or portable, but it'll do for now.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17321 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Support/MallocAllocator.h

index c17517e2a0c7e4bb7e6e08f0a9c55424c615572a..18ec611e1f7d69a9edfe3d793b6598646b3ef3b4 100644 (file)
@@ -72,6 +72,7 @@ inline bool operator!=(const MallocAllocator<T>&, const MallocAllocator<T>&) {
 }
 } // End llvm namespace
 
+#if defined(__linux__) && !(defined (sparc) || defined (_sparc))
 namespace std {
   template<typename Type, typename Type2>
   struct _Alloc_traits<Type, ::llvm::MallocAllocator<Type2> > {
@@ -81,5 +82,6 @@ namespace std {
     typedef ::llvm::MallocAllocator<Type> allocator_type;
   };
 }
+#endif
 
 #endif