From 6021ff727d331b04438a02675b8d9e82e6f9f1c8 Mon Sep 17 00:00:00 2001 From: whitequark Date: Wed, 10 Jun 2020 15:49:28 +0000 Subject: [PATCH] cxxrtl: restore C++11 compatibility. This is necessary to be able to build CXXRTL models via yosys-config. --- backends/cxxrtl/cxxrtl_backend.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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"; -- 2.30.2