diff --git a/llvm/include/llvm/ADT/FunctionExtras.h b/llvm/include/llvm/ADT/FunctionExtras.h index d92868e3715f4..e45d507bfd4bf 100644 --- a/llvm/include/llvm/ADT/FunctionExtras.h +++ b/llvm/include/llvm/ADT/FunctionExtras.h @@ -82,13 +82,6 @@ template class UniqueFunctionBase { static constexpr size_t InlineStorageSize = sizeof(void *) * 3; static constexpr size_t InlineStorageAlign = alignof(void *); - template - struct IsSizeLessThanThresholdT : std::false_type {}; - - template - struct IsSizeLessThanThresholdT< - T, std::enable_if_t> : std::true_type {}; - // Provide a type function to map parameters that won't observe extra copies // or moves and which are small enough to likely pass in register to values // and all other types to l-value reference types. We use this to compute the @@ -101,6 +94,9 @@ 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; using type = std::conditional_t::value && std::is_trivially_move_constructible::value &&