cxxrtl: restore C++11 compatibility.

This is necessary to be able to build CXXRTL models via yosys-config.
This commit is contained in:
whitequark 2020-06-10 15:49:28 +00:00
parent cde99e696a
commit 6021ff727d
1 changed files with 2 additions and 1 deletions

View File

@ -1922,8 +1922,9 @@ struct CxxrtlWorker {
if (top_module != nullptr && debug_info) {
f << "cxxrtl_toplevel " << design_ns << "_create() {\n";
inc_indent();
std::string top_type = design_ns + "::" + mangle(top_module);
f << indent << "return new _cxxrtl_toplevel { ";
f << "std::make_unique<" << design_ns << "::" << mangle(top_module) << ">()";
f << "std::unique_ptr<" << top_type << ">(new " + top_type + ")";
f << " };\n";
dec_indent();
f << "}\n";