projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
41f5a00
)
[mlir:SubElementInterfaces] Remove unnecessary static check
author
River Riddle
<riddleriver@gmail.com>
Mon, 7 Nov 2022 23:13:09 +0000
(15:13 -0800)
committer
River Riddle
<riddleriver@gmail.com>
Mon, 7 Nov 2022 23:13:21 +0000
(15:13 -0800)
We already constrain the template on just attributes/types.
mlir/include/mlir/IR/SubElementInterfaces.h
patch
|
blob
|
history
diff --git
a/mlir/include/mlir/IR/SubElementInterfaces.h
b/mlir/include/mlir/IR/SubElementInterfaces.h
index
07d246a
..
2af7642
100644
(file)
--- 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]);
}
}