Add check for Surelog command line args Signed-off-by: Kamil Rakoczy <krakoczy@antmicro.com>
diff --git a/uhdm-plugin/uhdmsurelogastfrontend.cc b/uhdm-plugin/uhdmsurelogastfrontend.cc index a5b0047..7bfd53d 100644 --- a/uhdm-plugin/uhdmsurelogastfrontend.cc +++ b/uhdm-plugin/uhdmsurelogastfrontend.cc
@@ -140,7 +140,10 @@ SURELOG::SymbolTable *symbolTable = new SURELOG::SymbolTable(); SURELOG::ErrorContainer *errors = new SURELOG::ErrorContainer(symbolTable); SURELOG::CommandLineParser *clp = new SURELOG::CommandLineParser(errors, symbolTable, false, false); - clp->parseCommandLine(cstrings.size(), &cstrings[0]); + bool success = clp->parseCommandLine(cstrings.size(), &cstrings[0]); + if (!success) { + log_error("Error parsing Surelog arguments!\n"); + } SURELOG::scompiler *compiler = nullptr; const std::vector<vpiHandle> uhdm_design = executeCompilation(symbolTable, errors, clp, compiler); struct AST::AstNode *current_ast = uhdm_ast.visit_designs(uhdm_design);