summaryrefslogtreecommitdiff
path: root/include/llvm/Support
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
commit75ba212653cc586dac075bd794efe1ecde26a139 (patch)
tree3439fe1fd202539e99a5e0fd065d36e1b6767203 /include/llvm/Support
parentebfe4d7fee96e635d2656fb664ee0b56c41d0fcc (diff)
downloadllvm-75ba212653cc586dac075bd794efe1ecde26a139.tar.gz
llvm-75ba212653cc586dac075bd794efe1ecde26a139.tar.bz2
llvm-75ba212653cc586dac075bd794efe1ecde26a139.tar.xz
[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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206226 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Support')
-rw-r--r--include/llvm/Support/Allocator.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/llvm/Support/Allocator.h b/include/llvm/Support/Allocator.h
index a28080187b..5eccbccbfc 100644
--- a/include/llvm/Support/Allocator.h
+++ b/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);
}