Conditionally set constructor, if it has any instructions.

git-svn-id: svn://10.0.0.236/trunk@73196 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
beard%netscape.com
2000-06-25 17:04:01 +00:00
parent 75fa0c383f
commit 1bb0ae2fc2
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;