mirror of https://github.com/llvm/circt.git
[LowerToHW] Reuse StringAttr for FieldInfo, nfc
This commit is contained in:
parent
1e10bea5ee
commit
adc41bfcd7
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue