From: River Riddle Date: Mon, 7 Nov 2022 23:13:09 +0000 (-0800) Subject: [mlir:SubElementInterfaces] Remove unnecessary static check X-Git-Tag: upstream/17.0.6~28275 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=604027519e937d53fc61f339f578f2c4d37067f0;p=platform%2Fupstream%2Fllvm.git [mlir:SubElementInterfaces] Remove unnecessary static check We already constrain the template on just attributes/types. --- diff --git a/mlir/include/mlir/IR/SubElementInterfaces.h b/mlir/include/mlir/IR/SubElementInterfaces.h index 07d246a..2af7642 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) { return cast(attrRepls.take_front(1)[0]); - } else if constexpr (!detail::IsInterface::value && - std::is_base_of_v) { + } else { return cast(typeRepls.take_front(1)[0]); } }