diff --git a/llvm/include/llvm/ADT/FunctionExtras.h b/llvm/include/llvm/ADT/FunctionExtras.h index 12a2dc36e1af0..2498cb7796f1f 100644 --- a/llvm/include/llvm/ADT/FunctionExtras.h +++ b/llvm/include/llvm/ADT/FunctionExtras.h @@ -90,13 +90,12 @@ template class UniqueFunctionBase { template struct AdjustedParamTBase { static_assert(!std::is_reference::value, "references should be handled by template specialization"); - template - using IsSizeLessThanThresholdT = - std::bool_constant; + static constexpr bool IsSizeLessThanThreshold = + sizeof(T) <= 2 * sizeof(void *); using type = std::conditional_t::value && std::is_trivially_move_constructible::value && - IsSizeLessThanThresholdT::value, + IsSizeLessThanThreshold, T, T &>; };