From: whitequark Date: Wed, 10 Jun 2020 15:49:28 +0000 (+0000) Subject: cxxrtl: restore C++11 compatibility. X-Git-Tag: working-ls180~480^2 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6021ff727d331b04438a02675b8d9e82e6f9f1c8;p=yosys.git cxxrtl: restore C++11 compatibility. This is necessary to be able to build CXXRTL models via yosys-config. --- diff --git a/backends/cxxrtl/cxxrtl_backend.cc b/backends/cxxrtl/cxxrtl_backend.cc index 785625f17..ed2d3261e 100644 --- a/backends/cxxrtl/cxxrtl_backend.cc +++ b/backends/cxxrtl/cxxrtl_backend.cc @@ -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";