Skip to content

Commit

Permalink
AlignOf.h: Satisfy both g++-4.7 and msc18.
Browse files Browse the repository at this point in the history
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258623 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
chapuni committed Jan 23, 2016
1 parent 36a34a0 commit eff8299
Showing 1 changed file with 2 additions and 15 deletions.
17 changes: 2 additions & 15 deletions include/llvm/Support/AlignOf.h
Original file line number Diff line number Diff line change
Expand Up @@ -244,28 +244,15 @@ 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,
AlignOf<llvm::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,
typename T8 = char, typename T9 = char, typename T10 = char>
struct AlignedCharArrayUnion : llvm::AlignedCharArray<
AlignOf<::llvm::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>)> {
};
#endif
} // end namespace llvm
#endif

0 comments on commit eff8299

Please sign in to comment.