diff --git a/mlir/include/mlir/Support/DebugAction.h b/mlir/include/mlir/Support/DebugAction.h --- a/mlir/include/mlir/Support/DebugAction.h +++ b/mlir/include/mlir/Support/DebugAction.h @@ -25,6 +25,7 @@ #include "llvm/Support/TypeName.h" #include "llvm/Support/raw_ostream.h" #include +#include namespace mlir { @@ -218,8 +219,8 @@ /// parameter types. template static constexpr bool canHandleWith() { - return llvm::is_invocable, - CallerParameterTs...>::value; + return std::is_invocable_v, + CallerParameterTs...>; } /// Allow access to `canHandleWith`. diff --git a/mlir/include/mlir/Transforms/DialectConversion.h b/mlir/include/mlir/Transforms/DialectConversion.h --- a/mlir/include/mlir/Transforms/DialectConversion.h +++ b/mlir/include/mlir/Transforms/DialectConversion.h @@ -16,6 +16,7 @@ #include "mlir/Rewrite/FrozenRewritePatternSet.h" #include "llvm/ADT/MapVector.h" #include "llvm/ADT/StringMap.h" +#include namespace mlir { @@ -245,7 +246,7 @@ /// different callback forms, that all compose into a single version. /// With callback of form: `Optional(T)` template - std::enable_if_t::value, ConversionCallbackFn> + std::enable_if_t, ConversionCallbackFn> wrapCallback(FnT &&callback) { return wrapCallback( [callback = std::forward(callback)]( @@ -262,7 +263,7 @@ /// With callback of form: `Optional(T, SmallVectorImpl /// &)` template - std::enable_if_t &>::value, + std::enable_if_t &>, ConversionCallbackFn> wrapCallback(FnT &&callback) { return wrapCallback( @@ -274,8 +275,8 @@ /// With callback of form: `Optional(T, SmallVectorImpl /// &, ArrayRef)`. template - std::enable_if_t &, - ArrayRef>::value, + std::enable_if_t &, + ArrayRef>, ConversionCallbackFn> wrapCallback(FnT &&callback) { return [callback = std::forward(callback)]( @@ -721,7 +722,7 @@ } template typename std::enable_if< - !llvm::is_invocable::value>::type + !std::is_invocable_v>::type addDynamicallyLegalOp(Callable &&callback) { addDynamicallyLegalOp( [=](Operation *op) { return callback(cast(op)); }); @@ -761,7 +762,7 @@ } template typename std::enable_if< - !llvm::is_invocable::value>::type + !std::is_invocable_v>::type markOpRecursivelyLegal(Callable &&callback) { markOpRecursivelyLegal( [=](Operation *op) { return callback(cast(op)); });