From 9fadd7821d09a157a70cfdc9e5583f3c8478ebae Mon Sep 17 00:00:00 2001 From: steve Date: Sun, 2 May 1999 23:25:32 +0000 Subject: [PATCH] Enforce module instance names. --- pform.cc | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/pform.cc b/pform.cc index 228a1a168..dde548542 100644 --- a/pform.cc +++ b/pform.cc @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #if !defined(WINNT) -#ident "$Id: pform.cc,v 1.11 1999/04/19 01:59:37 steve Exp $" +#ident "$Id: pform.cc,v 1.12 1999/05/02 23:25:32 steve Exp $" #endif # include "pform.h" @@ -274,6 +274,13 @@ void pform_make_modgate(const string&type, const vector&wires, const string&fn, unsigned ln) { + if (name == "") { + cerr << fn << ":" << ln << ": Instantiation of " << type + << " module requires an instance name." << endl; + error_count += 1; + return; + } + PGate*cur = new PGModule(type, name, wires); cur->set_file(fn); cur->set_lineno(ln); @@ -528,6 +535,9 @@ int pform_parse(const char*path, map&modules, /* * $Log: pform.cc,v $ + * Revision 1.12 1999/05/02 23:25:32 steve + * Enforce module instance names. + * * Revision 1.11 1999/04/19 01:59:37 steve * Add memories to the parse and elaboration phases. *