[Allocator] Hack around the fact that GCC can't compile the
authorChandler Carruth <chandlerc@gmail.com>
Tue, 15 Apr 2014 00:22:53 +0000 (00:22 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Tue, 15 Apr 2014 00:22:53 +0000 (00:22 +0000)
static_assert added in r206225. I'm looking into a proper fix, but
wanted the bots back.

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

include/llvm/Support/Allocator.h

index a28080187b6e88bc0f84c7299b76a04c7e53ae52..5eccbccbfc2b5c2b2407cc755397f9339c3b3581 100644 (file)
@@ -50,12 +50,14 @@ public:
   /// \brief Allocate \a Size bytes of \a Alignment aligned memory. This method
   /// must be implemented by \c DerivedT.
   void *Allocate(size_t Size, size_t Alignment) {
+#ifdef __clang__
     static_assert(static_cast<void *(AllocatorBase::*)(size_t, size_t)>(
                       &AllocatorBase::Allocate) !=
                       static_cast<void *(DerivedT::*)(size_t, size_t)>(
                           &DerivedT::Allocate),
                   "Class derives from AllocatorBase without implementing the "
                   "core Allocate(size_t, size_t) overload!");
+#endif
     return static_cast<DerivedT *>(this)->Allocate(Size, Alignment);
   }