cxxrtl: fix format of hdlnames.
authorwhitequark <whitequark@whitequark.org>
Mon, 8 Jun 2020 19:50:09 +0000 (19:50 +0000)
committerwhitequark <whitequark@whitequark.org>
Mon, 8 Jun 2020 20:19:41 +0000 (20:19 +0000)
The CXXRTL code that handled the `hdlname` attribute implemented
outdated semantics.

backends/cxxrtl/cxxrtl_backend.cc

index b3aec21100610d2a27d51ca176eea808d4c03be0..bf01b263a7089fab45d505269682edc77db96395 100644 (file)
@@ -508,7 +508,7 @@ std::string get_hdl_name(T *object)
        if (object->has_attribute(ID::hdlname))
                return object->get_string_attribute(ID::hdlname);
        else
-               return object->name.str();
+               return object->name.str().substr(1);
 }
 
 struct CxxrtlWorker {