verific: ignore anonymous enums
authorEddie Hung <eddie@fpgeh.com>
Thu, 30 Apr 2020 14:48:47 +0000 (07:48 -0700)
committerEddie Hung <eddie@fpgeh.com>
Thu, 30 Apr 2020 14:48:47 +0000 (07:48 -0700)
frontends/verific/verific.cc

index b818d01f78aff46cb7f08091b77fb146c512f98d..fe4bda68e00bb06071ea4305eb7edb4359b41826 100644 (file)
@@ -172,7 +172,10 @@ void VerificImporter::import_attributes(dict<RTLIL::IdString, RTLIL::Const> &att
                        return;
                if (nl->IsFromVhdl() && strcmp(type_range->GetTypeName(), "STD_LOGIC") == 0)
                        return;
-               attributes.emplace(ID::wiretype, RTLIL::escape_id(type_range->GetTypeName()));
+               auto type_name = type_range->GetTypeName();
+               if (!type_name)
+                       return;
+               attributes.emplace(ID::wiretype, RTLIL::escape_id(type_name));
 
                MapIter mi;
                const char *k, *v;