chipsalliance / UHDM

Universal Hardware Data Model. A complete modeling of the IEEE SystemVerilog Object Model with VPI Interface, Elaborator, Serialization, Visitor and Listener. Used as a compiled interchange format in between SystemVerilog tools. Compiles on Linux gcc, Windows msys2-gcc & msvc, OsX

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Generated file src/interface_expr.cpp is invalid C++ code

hzeller opened this issue · comments

The file, generated from model/interface_expr.yaml

creates a code-snippet with an empty if-condition:

  if () {
    // ....
    return false;
  }

This file is not mentioned in the CMakeLists.txt file, so this is why it happens to not generate a compile error, but this leaves an unimplemented set of functions declared in the generated headers/interface_expr.h

commented

Not anymore and the is compiled as part of the build now.

if (false) {
  item->GetSerializer()->GetErrorHandler()(ErrorType::UHDM_WRONG_OBJECT_TYPE, "Internal Error: adding wrong object type (" + UhdmName(uhdmtype) + ") in a interface_expr group!", the_item, nullptr);
  return false;
}