Skip to content

Commit 194fd83

Browse files
committed
clean up how we use attributes
1 parent 0b5aea7 commit 194fd83

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

mlir/lib/Dialect/EmitC/Transforms/WrapFuncInClass.cpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,8 @@ class WrapFuncInClass : public OpRewritePattern<emitc::FuncOp> {
6262
Attribute argAttr = nullptr;
6363

6464
fieldName = rewriter.getStringAttr("fieldName" + std::to_string(idx));
65-
if (argAttrs && idx < argAttrs->size()) {
66-
if (DictionaryAttr dictAttr =
67-
dyn_cast<mlir::DictionaryAttr>((*argAttrs)[idx]))
68-
argAttr = (*argAttrs)[idx];
69-
}
65+
if (argAttrs && idx < argAttrs->size())
66+
argAttr = (*argAttrs)[idx];
7067

7168
TypeAttr typeAttr = TypeAttr::get(val.getType());
7269
fields.push_back({fieldName, typeAttr});

0 commit comments

Comments
 (0)