diff options
author | Reid Kleckner <rnk@google.com> | 2017-01-10 01:05:33 +0000 |
---|---|---|
committer | Reid Kleckner <rnk@google.com> | 2017-01-10 01:05:33 +0000 |
commit | 4ed29420042c4d169f827fc4079fa1200622fc6a (patch) | |
tree | 55ac79f61a148766cb4ca596d9d8b38ddfcae590 | |
parent | c92b61263659d98cd8bba506f96782aab8175973 (diff) | |
download | bcm5719-llvm-4ed29420042c4d169f827fc4079fa1200622fc6a.tar.gz bcm5719-llvm-4ed29420042c4d169f827fc4079fa1200622fc6a.zip |
Try once again to fix the MSVC build of AlignedCharArrayUnion
It was complaining about ambiguity between llvm::detail and
llvm::support::detail:
error C2872: 'detail': ambiguous symbol
note: could be 'llvm::detail'
note: or 'llvm::support::detail'
Standardize on llvm::support::detail to hide these symbols further.
llvm-svn: 291519
-rw-r--r-- | llvm/include/llvm/Support/AlignOf.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm/include/llvm/Support/AlignOf.h b/llvm/include/llvm/Support/AlignOf.h index de2f1add0b1..2d8297ee87d 100644 --- a/llvm/include/llvm/Support/AlignOf.h +++ b/llvm/include/llvm/Support/AlignOf.h @@ -106,6 +106,7 @@ LLVM_ALIGNEDCHARARRAY_TEMPLATE_ALIGNMENT(128) // That is supported by Visual Studio 2015 and GCC 5.1. // Once these are the baselines for LLVM, we can use std::aligned_union instead. +namespace support { namespace detail { template <typename T1> constexpr size_t aligner() { return alignof(T1); } @@ -120,6 +121,7 @@ template <typename T1, typename T2, typename... Ts> constexpr size_t sizer() { return (sizeof(T1) > sizer<T2, Ts...>()) ? sizeof(T1) : sizer<T2, Ts...>(); } } // end namespace detail +} // end namespace support /// \brief This union template exposes a suitably aligned and sized character /// array member which can hold elements of any of a number of types. @@ -129,8 +131,8 @@ template <typename T1, typename T2, typename... Ts> constexpr size_t sizer() { /// a placement new of any of these types. template <typename... Ts> struct AlignedCharArrayUnion - : llvm::AlignedCharArray<detail::aligner<Ts...>(), - detail::sizer<Ts...>()> {}; + : llvm::AlignedCharArray<support::detail::aligner<Ts...>(), + support::detail::sizer<Ts...>()> {}; } // end namespace llvm #endif // LLVM_SUPPORT_ALIGNOF_H |