[Calyx] Remove C++20 Features, NFC

Signed-off-by: Schuyler Eldridge <schuyler.eldridge@sifive.com>
This commit is contained in:
Schuyler Eldridge 2021-09-08 17:26:48 -04:00
parent 5e15a5bc0d
commit 5fbf9974e1
No known key found for this signature in database
GPG Key ID: 50C5E9936AAD536D
2 changed files with 8 additions and 9 deletions

View File

@ -95,10 +95,10 @@ def CellOpInterface : OpInterface<"CellInterface"> {
auto zip = llvm::zip($_op->getResults(), $_op.portDirections(), $_op.portNames()); auto zip = llvm::zip($_op->getResults(), $_op.portDirections(), $_op.portNames());
for (auto&& [result, direction, name] : zip) for (auto&& [result, direction, name] : zip)
info.push_back(PortInfo{ info.push_back(PortInfo{
.name=StringAttr::get($_op->getContext(), name), StringAttr::get($_op->getContext(), name),
.type=result.getType(), result.getType(),
.direction=direction, direction,
.attributes=DictionaryAttr() DictionaryAttr()
}); });
return info; return info;
}] }]

View File

@ -284,11 +284,10 @@ SmallVector<PortInfo> ComponentOp::getPortInfo() {
SmallVector<PortInfo> results; SmallVector<PortInfo> results;
for (uint64_t i = 0, e = portNamesAttr.size(); i != e; ++i) { for (uint64_t i = 0, e = portNamesAttr.size(); i != e; ++i) {
results.push_back( results.push_back(PortInfo{portNamesAttr[i].cast<StringAttr>(),
PortInfo{.name = portNamesAttr[i].cast<StringAttr>(), portTypes[i],
.type = portTypes[i], direction::get(portDirectionsAttr.getValue()[i]),
.direction = direction::get(portDirectionsAttr.getValue()[i]), portAttrs[i].cast<DictionaryAttr>()});
.attributes = portAttrs[i].cast<DictionaryAttr>()});
} }
return results; return results;
} }