[llvm] r258600 - AlignOf.h: Appease g++-4.7 for now. Will fix later.
NAKAMURA Takumi via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 22 18:22:36 PST 2016
Author: chapuni
Date: Fri Jan 22 20:22:36 2016
New Revision: 258600
URL: http://llvm.org/viewvc/llvm-project?rev=258600&view=rev
Log:
AlignOf.h: Appease g++-4.7 for now. Will fix later.
Modified:
llvm/trunk/include/llvm/Support/AlignOf.h
Modified: llvm/trunk/include/llvm/Support/AlignOf.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/AlignOf.h?rev=258600&r1=258599&r2=258600&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Support/AlignOf.h (original)
+++ llvm/trunk/include/llvm/Support/AlignOf.h Fri Jan 22 20:22:36 2016
@@ -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 <typename T1,
+ typename T2 = char, typename T3 = char, typename T4 = char,
+ typename T5 = char, typename T6 = char, typename T7 = char,
+ typename T8 = char, typename T9 = char, typename T10 = char>
+struct AlignedCharArrayUnion : llvm::AlignedCharArray<
+ AlignOf<detail::AlignerImpl<T1, T2, T3, T4, T5,
+ T6, T7, T8, T9, T10> >::Alignment,
+ sizeof(::llvm::detail::SizerImpl<T1, T2, T3, T4, T5,
+ T6, T7, T8, T9, T10>)> {
+};
+#else
template <typename T1,
typename T2 = char, typename T3 = char, typename T4 = char,
typename T5 = char, typename T6 = char, typename T7 = char,
@@ -254,5 +266,6 @@ struct AlignedCharArrayUnion : llvm::Ali
sizeof(::llvm::detail::SizerImpl<T1, T2, T3, T4, T5,
T6, T7, T8, T9, T10>)> {
};
+#endif
} // end namespace llvm
#endif
More information about the llvm-commits
mailing list