[Mlir-commits] [mlir] [mlir][Linalg] Split explicit inherent/discardable attribute APIs access (PR #218916)
Krzysztof Drewniak
llvmlistbot at llvm.org
Wed Aug 26 14:46:22 PDT 2026
================
@@ -976,7 +977,8 @@ std::string {0}::getLibraryCallName() {{
// {0}: Attribute name
// {1}: Attribute size
static const char attrFmt[] = R"FMT(
-if (auto attr = op->getAttrOfType<DenseElementsAttr>("{0}")) {{
+if (auto attr = llvm::dyn_cast_or_null<DenseElementsAttr>(
+ op->getInherentAttr("{0}").value_or(Attribute{{}))) {{
----------------
krzysz00 wrote:
Is there not a `getInherentAttrOfType`?
https://github.com/llvm/llvm-project/pull/218916
More information about the Mlir-commits
mailing list