diff --git a/llvm/include/llvm/ADT/FunctionExtras.h b/llvm/include/llvm/ADT/FunctionExtras.h --- a/llvm/include/llvm/ADT/FunctionExtras.h +++ b/llvm/include/llvm/ADT/FunctionExtras.h @@ -64,12 +64,12 @@ protected: static constexpr size_t InlineStorageSize = sizeof(void *) * 3; - // MSVC has a bug and ICEs if we give it a particular dependent value - // expression as part of the `std::conditional` below. To work around this, - // we build that into a template struct's constexpr bool. - template struct IsSizeLessThanThresholdT { - static constexpr bool value = sizeof(T) <= (2 * sizeof(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