[LowerToHW] Reuse StringAttr for FieldInfo, nfc

This commit is contained in:
Hideto Ueno 2021-12-18 00:47:48 +09:00
parent 1e10bea5ee
commit adc41bfcd7
1 changed files with 1 additions and 3 deletions

View File

@ -72,9 +72,7 @@ static Type lowerType(Type type) {
Type etype = lowerType(element.type);
if (!etype)
return {};
// TODO: make hw::StructType contain StringAttrs.
auto name = StringAttr::get(element.name.getValue(), type.getContext());
hwfields.push_back(hw::StructType::FieldInfo{name, etype});
hwfields.push_back(hw::StructType::FieldInfo{element.name, etype});
}
return hw::StructType::get(type.getContext(), hwfields);
}