Internals: Make consistent left/right/lo/hi accessors to ranges.

Change order of Range to store always left:right.
XML output changes to now show left:right (previously info was lost), no other change intended.
This commit is contained in:
Wilson Snyder
2020-12-06 21:13:56 -05:00
parent b32d530000
commit cd248f6bd7
16 changed files with 177 additions and 206 deletions
+4 -4
View File
@@ -752,9 +752,9 @@ void EmitCSyms::emitSymImp() {
// Range is always first, it's not in "C" order
if (basicp->isRanged()) {
bounds += " ,";
bounds += cvtToStr(basicp->msb());
bounds += cvtToStr(basicp->hi());
bounds += ",";
bounds += cvtToStr(basicp->lsb());
bounds += cvtToStr(basicp->lo());
pdim++;
}
for (AstNodeDType* dtypep = varp->dtypep(); dtypep;) {
@@ -762,9 +762,9 @@ void EmitCSyms::emitSymImp() {
= dtypep->skipRefp(); // Skip AstRefDType/AstTypedef, or return same node
if (const AstNodeArrayDType* adtypep = VN_CAST(dtypep, NodeArrayDType)) {
bounds += " ,";
bounds += cvtToStr(adtypep->msb());
bounds += cvtToStr(adtypep->hi());
bounds += ",";
bounds += cvtToStr(adtypep->lsb());
bounds += cvtToStr(adtypep->lo());
if (VN_IS(dtypep, PackArrayDType)) {
pdim++;
} else {