Internals: In AstBasicDType avoid use of Range for constants. No functional change.

This commit is contained in:
Wilson Snyder
2012-02-20 11:48:31 -05:00
parent 7caafb4014
commit d699247269
11 changed files with 45 additions and 24 deletions
+2 -1
View File
@@ -269,7 +269,7 @@ AstNodeDType* AstVar::dtypeDimensionp(int dimension) const {
}
else if (AstBasicDType* adtypep = dtypep->castBasicDType()) {
// AstBasicDType - nothing below, return null
if (adtypep->rangep()) {
if (adtypep->isRanged()) {
if ((dim++) == dimension) {
return adtypep;
}
@@ -524,6 +524,7 @@ void AstAttrOf::dump(ostream& str) {
void AstBasicDType::dump(ostream& str) {
this->AstNodeDType::dump(str);
str<<" ["<<keyword().ascii()<<"]";
if (!rangep() && msb()) str<<" range["<<msb()<<":"<<lsb()<<"]";
if (implicit()) str<<" [IMPLICIT]";
}
void AstCCast::dump(ostream& str) {