Emit opaque structure instead of undefined array

This commit is contained in:
caheckman 2020-05-13 15:23:30 -04:00
parent 8a1c44c1d7
commit 0f0a82b8b1

View file

@ -591,19 +591,17 @@ public class PcodeDataTypeManager {
if (sz <= 0) {
sz = size;
}
appendNameIdAttributes(resBuf, origType);
if (sz < 16) {
appendNameIdAttributes(resBuf, origType);
SpecXmlUtils.encodeStringAttribute(resBuf, "metatype", "unknown");
SpecXmlUtils.encodeSignedIntegerAttribute(resBuf, "size", sz);
resBuf.append('>');
}
else {
SpecXmlUtils.encodeStringAttribute(resBuf, "name", "");
SpecXmlUtils.encodeStringAttribute(resBuf, "metatype", "array");
// Build an "opaque" structure with no fields
SpecXmlUtils.encodeStringAttribute(resBuf, "metatype", "struct");
SpecXmlUtils.encodeSignedIntegerAttribute(resBuf, "size", sz);
SpecXmlUtils.encodeSignedIntegerAttribute(resBuf, "arraysize", sz);
resBuf.append('>');
resBuf.append(buildTypeRef(new ByteDataType(), 1));
}
}
return resBuf.toString();