summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2014-04-15 00:22:53 +0000
committerChandler Carruth <chandlerc@gmail.com>2014-04-15 00:22:53 +0000
commitce020670a49cfb1dc18ec506761b1b464d50cb4d (patch)
treea76d0538c57a5fdd0097f3a344c17feb78930730
parent761af74802ee320d38430925eb9e30c4b1b0832c (diff)
downloadbcm5719-llvm-ce020670a49cfb1dc18ec506761b1b464d50cb4d.tar.gz
bcm5719-llvm-ce020670a49cfb1dc18ec506761b1b464d50cb4d.zip
[Allocator] Hack around the fact that GCC can't compile the
static_assert added in r206225. I'm looking into a proper fix, but wanted the bots back. llvm-svn: 206226
-rw-r--r--llvm/include/llvm/Support/Allocator.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/include/llvm/Support/Allocator.h b/llvm/include/llvm/Support/Allocator.h
index a28080187b6..5eccbccbfc2 100644
--- a/llvm/include/llvm/Support/Allocator.h
+++ b/llvm/include/llvm/Support/Allocator.h
@@ -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);
}
OpenPOWER on IntegriCloud