Conditionally set constructor, if it has any instructions.

This commit is contained in:
beard%netscape.com 2000-06-25 17:04:01 +00:00
parent 21f549896a
commit 40e53d46ea
2 changed files with 4 additions and 2 deletions

View File

@ -1400,7 +1400,8 @@ TypedRegister ICodeGenerator::genStmt(StmtNode *p, LabelSet *currentLabelSet)
s = s->next;
}
// FIXME: what about static member initialization? that's what mcg should be collecting.
thisClass->setConstructor(ccg.complete());
if (ccg.get_iCode()->size())
thisClass->setConstructor(ccg.complete());
}
}
break;

View File

@ -1400,7 +1400,8 @@ TypedRegister ICodeGenerator::genStmt(StmtNode *p, LabelSet *currentLabelSet)
s = s->next;
}
// FIXME: what about static member initialization? that's what mcg should be collecting.
thisClass->setConstructor(ccg.complete());
if (ccg.get_iCode()->size())
thisClass->setConstructor(ccg.complete());
}
}
break;