Fix misc string handling issues.

This commit is contained in:
Wilson Snyder
2014-11-28 20:24:42 -05:00
parent 2e5f5010f7
commit ce4dfb4296
4 changed files with 10 additions and 6 deletions
+3 -3
View File
@@ -1392,9 +1392,6 @@ void EmitCImp::emitVarResets(AstNodeModule* modp) {
if (varp->isIO() && modp->isTop() && optSystemC()) {
// System C top I/O doesn't need loading, as the lower level subinst code does it.
}
else if (varp->basicp() && varp->basicp()->keyword() == AstBasicDTypeKwd::STRING) {
// Constructor deals with it
}
else if (varp->isParam()) {
if (!varp->valuep()) nodep->v3fatalSrc("No init for a param?");
// If a simple CONST value we initialize it using an enum
@@ -1413,6 +1410,9 @@ void EmitCImp::emitVarResets(AstNodeModule* modp) {
varp->v3fatalSrc("InitArray under non-arrayed var");
}
}
else if (varp->basicp() && varp->basicp()->keyword() == AstBasicDTypeKwd::STRING) {
// Constructor deals with it
}
else {
int vects = 0;
// This isn't very robust and may need cleanup for other data types