Skip to content

Commit

Permalink
Move push_back
Browse files Browse the repository at this point in the history
  • Loading branch information
cferry-AMD committed Oct 2, 2024
1 parent 1a5a542 commit 6d557e5
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions lib/Dialect/XTenNN/IR/XTenNNOps.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -232,17 +232,14 @@ static ParseResult parseKernelInstantiationArgs(OpAsmParser &p,

if (failed(p.parseCommaSeparatedList([&p, &names, &values]() {
std::string name;
bool hasName = false;
if (succeeded(p.parseOptionalString(&name))) {
hasName = true;
names.push_back(StringAttr::get(p.getContext(), name));
if (failed(p.parseEqual()))
return failure();
}
Attribute attr;
auto res = p.parseOptionalAttribute(attr);
if (res.has_value() && succeeded(*res)) {
if (hasName)
names.push_back(StringAttr::get(p.getContext(), name));
values.push_back(attr);
}
if (res.has_value() && failed(*res))
Expand Down

0 comments on commit 6d557e5

Please sign in to comment.