Skip to content

Commit 49a4a6c

Browse files
authored
Merge pull request #504 from antmicro/kr/adapt_uhdm_api_change
systemverilog-plugin: adapt visit_object calls to new UHDM api
2 parents dcbf6bb + 9dd2c51 commit 49a4a6c

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

systemverilog-plugin/uhdmastfrontend.cc

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,10 @@
1717
*
1818
*/
1919

20+
#include "uhdm/uhdm-version.h" // UHDM_VERSION define
21+
#include "uhdm/vpi_visitor.h" // visit_object
2022
#include "uhdmcommonfrontend.h"
2123

22-
namespace UHDM
23-
{
24-
extern void visit_object(vpiHandle obj_h, int indent, const char *relation, std::set<const BaseClass *> *visited, std::ostream &out,
25-
bool shallowVisit = false);
26-
}
27-
2824
namespace systemverilog_plugin
2925
{
3026

@@ -54,7 +50,11 @@ struct UhdmAstFrontend : public UhdmCommonFrontend {
5450
if (this->shared.debug_flag || !this->report_directory.empty()) {
5551
for (auto design : restoredDesigns) {
5652
std::ofstream null_stream;
53+
#if UHDM_VERSION > 1057
54+
UHDM::visit_object(design, this->shared.debug_flag ? std::cout : null_stream);
55+
#else
5756
UHDM::visit_object(design, 1, "", &this->shared.report.unhandled, this->shared.debug_flag ? std::cout : null_stream);
57+
#endif
5858
}
5959
}
6060
UhdmAst uhdm_ast(this->shared);

systemverilog-plugin/uhdmsurelogastfrontend.cc

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,8 @@
3737
#include "Surelog/CommandLine/CommandLineParser.h"
3838
#include "Surelog/ErrorReporting/ErrorContainer.h"
3939
#include "Surelog/SourceCompile/SymbolTable.h"
40-
41-
namespace UHDM
42-
{
43-
extern void visit_object(vpiHandle obj_h, int indent, const char *relation, std::set<const BaseClass *> *visited, std::ostream &out,
44-
bool shallowVisit = false);
45-
}
40+
#include "uhdm/uhdm-version.h" // UHDM_VERSION define
41+
#include "uhdm/vpi_visitor.h" // visit_object
4642

4743
namespace systemverilog_plugin
4844
{
@@ -194,7 +190,11 @@ struct UhdmSurelogAstFrontend : public UhdmCommonFrontend {
194190
if (this->shared.debug_flag || !this->report_directory.empty()) {
195191
for (auto design : uhdm_designs) {
196192
std::ofstream null_stream;
193+
#if UHDM_VERSION > 1057
194+
UHDM::visit_object(design, this->shared.debug_flag ? std::cout : null_stream);
195+
#else
197196
UHDM::visit_object(design, 1, "", &this->shared.report.unhandled, this->shared.debug_flag ? std::cout : null_stream);
197+
#endif
198198
}
199199
}
200200

0 commit comments

Comments
 (0)