From 7cfaab2bcce1444fbb737a12d6dee9daaeeaf83e Mon Sep 17 00:00:00 2001 From: NAKAMURA Takumi Date: Sat, 23 Jan 2016 02:22:36 +0000 Subject: AlignOf.h: Appease g++-4.7 for now. Will fix later. llvm-svn: 258600 --- llvm/include/llvm/Support/AlignOf.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'llvm/include') diff --git a/llvm/include/llvm/Support/AlignOf.h b/llvm/include/llvm/Support/AlignOf.h index e6a61aec851..8600f42f495 100644 --- a/llvm/include/llvm/Support/AlignOf.h +++ b/llvm/include/llvm/Support/AlignOf.h @@ -244,6 +244,18 @@ union SizerImpl { /// expose a char array buffer member which can be used as suitable storage for /// a placement new of any of these types. Support for more than ten types can /// be added at the cost of more boilerplate. +#if __GNUC__ == 4 && __GNUC_MINOR__ == 7 +template +struct AlignedCharArrayUnion : llvm::AlignedCharArray< + AlignOf >::Alignment, + sizeof(::llvm::detail::SizerImpl)> { +}; +#else template )> { }; +#endif } // end namespace llvm #endif -- cgit v1.2.3