3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-04-07 09:55:20 +00:00

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

View file

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