HomePhabricator

[llvm][STLExtras] Add various type_trait utilities currently present in MLIR

Authored by rriddle on Apr 14 2020, 2:52 PM.

Description

[llvm][STLExtras] Add various type_trait utilities currently present in MLIR

This revision moves several type_trait utilities from MLIR into LLVM. Namely, this revision adds:
is_detected - This matches the experimental std::is_detected
is_invocable - This matches the c++17 std::is_invocable
function_traits - A utility traits class for getting the argument and result types of a callable type

Differential Revision: https://reviews.llvm.org/D78059