diff options
author | whitequark <whitequark@whitequark.org> | 2020-06-10 15:49:28 +0000 |
---|---|---|
committer | whitequark <whitequark@whitequark.org> | 2020-06-10 15:57:07 +0000 |
commit | 6021ff727d331b04438a02675b8d9e82e6f9f1c8 (patch) | |
tree | eb8cc176ee9051e34a8810b7ef9c82be956983aa /backends/cxxrtl | |
parent | cde99e696a5d1506cbd86732eeb41fd9f1774405 (diff) | |
download | yosys-6021ff727d331b04438a02675b8d9e82e6f9f1c8.tar.gz yosys-6021ff727d331b04438a02675b8d9e82e6f9f1c8.tar.bz2 yosys-6021ff727d331b04438a02675b8d9e82e6f9f1c8.zip |
cxxrtl: restore C++11 compatibility.
This is necessary to be able to build CXXRTL models via yosys-config.
Diffstat (limited to 'backends/cxxrtl')
-rw-r--r-- | backends/cxxrtl/cxxrtl_backend.cc | 3 |
1 files changed, 2 insertions, 1 deletions
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"; |