[Mlir-commits] [mlir] 6040275 - [mlir:SubElementInterfaces] Remove unnecessary static check
River Riddle
llvmlistbot at llvm.org
Mon Nov 7 15:14:15 PST 2022
Author: River Riddle
Date: 2022-11-07T15:13:21-08:00
New Revision: 604027519e937d53fc61f339f578f2c4d37067f0
URL: https://github.com/llvm/llvm-project/commit/604027519e937d53fc61f339f578f2c4d37067f0
DIFF: https://github.com/llvm/llvm-project/commit/604027519e937d53fc61f339f578f2c4d37067f0.diff
LOG: [mlir:SubElementInterfaces] Remove unnecessary static check
We already constrain the template on just attributes/types.
Added:
Modified:
mlir/include/mlir/IR/SubElementInterfaces.h
Removed:
################################################################################
diff --git a/mlir/include/mlir/IR/SubElementInterfaces.h b/mlir/include/mlir/IR/SubElementInterfaces.h
index 07d246aafbfa7..2af7642e93b25 100644
--- a/mlir/include/mlir/IR/SubElementInterfaces.h
+++ b/mlir/include/mlir/IR/SubElementInterfaces.h
@@ -138,8 +138,7 @@ struct AttrTypeSubElementHandler<
return T();
if constexpr (std::is_base_of_v<Attribute, T>) {
return cast<T>(attrRepls.take_front(1)[0]);
- } else if constexpr (!detail::IsInterface<T>::value &&
- std::is_base_of_v<Type, T>) {
+ } else {
return cast<T>(typeRepls.take_front(1)[0]);
}
}
More information about the Mlir-commits
mailing list