[llvm] r291515 - Revert the attempt to optimize the constexpr functions. MSVC does not handle this yet
Reid Kleckner via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 9 16:29:05 PST 2017
Author: rnk
Date: Mon Jan 9 18:29:05 2017
New Revision: 291515
URL: http://llvm.org/viewvc/llvm-project?rev=291515&view=rev
Log:
Revert the attempt to optimize the constexpr functions. MSVC does not handle this yet
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=291515&r1=291514&r2=291515&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Support/AlignOf.h (original)
+++ llvm/trunk/include/llvm/Support/AlignOf.h Mon Jan 9 18:29:05 2017
@@ -110,15 +110,14 @@ namespace detail {
template <typename T1> constexpr size_t aligner() { return alignof(T1); }
template <typename T1, typename T2, typename... Ts> constexpr size_t aligner() {
- size_t rest = aligner<T2, Ts...>();
- return (alignof(T1) > rest) ? alignof(T1) : rest;
+ return (alignof(T1) > aligner<T2, Ts...>()) ? alignof(T1)
+ : aligner<T2, Ts...>();
}
template <typename T1> constexpr size_t sizer() { return sizeof(T1); }
template <typename T1, typename T2, typename... Ts> constexpr size_t sizer() {
- size_t rest = sizer<T2, Ts...>();
- return (sizeof(T1) > rest) ? sizeof(T1) : rest;
+ return (sizeof(T1) > sizer<T2, Ts...>()) ? sizeof(T1) : sizer<T2, Ts...>();
}
} // end namespace detail
More information about the llvm-commits
mailing list