From 84c1b3b3ed6d5f03e23efb2efa3fd04b3fab4b35 Mon Sep 17 00:00:00 2001 From: Gabe Black Date: Fri, 15 Jun 2018 15:14:54 -0700 Subject: [PATCH] systemc: Add support for deprecated integer report handler ids. These are deprecated but still used in the regression tests. Change-Id: Id59cf950fbe0530a6cdce20a256d450b243f12d3 Reviewed-on: https://gem5-review.googlesource.com/11256 Reviewed-by: Gabe Black Maintainer: Gabe Black --- src/systemc/ext/utils/sc_report.hh | 10 +++++ src/systemc/ext/utils/sc_report_handler.hh | 4 ++ src/systemc/utils/sc_report.cc | 51 ++++++++++++++++++++++ src/systemc/utils/sc_report_handler.cc | 7 +++ 4 files changed, 72 insertions(+) diff --git a/src/systemc/ext/utils/sc_report.hh b/src/systemc/ext/utils/sc_report.hh index 9ba2b334d..f0ed14fb2 100644 --- a/src/systemc/ext/utils/sc_report.hh +++ b/src/systemc/ext/utils/sc_report.hh @@ -74,6 +74,16 @@ class sc_report : public std::exception const char *get_process_name() const; virtual const char *what() const throw(); + + // Deprecated + static const char *get_message(int id); + static bool is_suppressed(int id); + static void make_warnings_errors(bool); + static void register_id(int id, const char *msg); + static void suppress_id(int id, bool); // Only for info or warning. + static void suppress_infos(bool); + static void suppress_warnings(bool); + int get_id() const; }; // A non-standard function the Accellera datatypes rely on. diff --git a/src/systemc/ext/utils/sc_report_handler.hh b/src/systemc/ext/utils/sc_report_handler.hh index d0eea77df..6101e2b72 100644 --- a/src/systemc/ext/utils/sc_report_handler.hh +++ b/src/systemc/ext/utils/sc_report_handler.hh @@ -68,6 +68,10 @@ class sc_report_handler static void report(sc_severity, const char *msg_type, const char *msg, int verbosity, const char *file, int line); + // Deprecated + static void report(sc_severity, int id, const char *msg, const char *file, + int line); + static sc_actions set_actions(sc_severity, sc_actions=SC_UNSPECIFIED); static sc_actions set_actions(const char *msg_type, sc_actions=SC_UNSPECIFIED); diff --git a/src/systemc/utils/sc_report.cc b/src/systemc/utils/sc_report.cc index 0e6b8b0bd..6edbf2a05 100644 --- a/src/systemc/utils/sc_report.cc +++ b/src/systemc/utils/sc_report.cc @@ -110,6 +110,57 @@ sc_report::what() const throw() return ""; } +const char * +sc_report::get_message(int id) +{ + warn("%s not implemented.\n", __PRETTY_FUNCTION__); + return ""; +} + +bool +sc_report::is_suppressed(int id) +{ + warn("%s not implemented.\n", __PRETTY_FUNCTION__); + return false; +} + +void +sc_report::make_warnings_errors(bool) +{ + warn("%s not implemented.\n", __PRETTY_FUNCTION__); +} + +void +sc_report::register_id(int id, const char *msg) +{ + warn("%s not implemented.\n", __PRETTY_FUNCTION__); +} + +void +sc_report::suppress_id(int id, bool) +{ + warn("%s not implemented.\n", __PRETTY_FUNCTION__); +} + +void +sc_report::suppress_infos(bool) +{ + warn("%s not implemented.\n", __PRETTY_FUNCTION__); +} + +void +sc_report::suppress_warnings(bool) +{ + warn("%s not implemented.\n", __PRETTY_FUNCTION__); +} + +int +sc_report::get_id() const +{ + warn("%s not implemented.\n", __PRETTY_FUNCTION__); + return 0; +} + void sc_abort() { diff --git a/src/systemc/utils/sc_report_handler.cc b/src/systemc/utils/sc_report_handler.cc index 3bb905044..319851b2b 100644 --- a/src/systemc/utils/sc_report_handler.cc +++ b/src/systemc/utils/sc_report_handler.cc @@ -47,6 +47,13 @@ sc_report_handler::report(sc_severity, const char *msg_type, const char *msg, warn("%s not implemented.\n", __PRETTY_FUNCTION__); } +void +sc_report_handler::report(sc_severity, int id, const char *msg, + const char *file, int line) +{ + warn("%s not implemented.\n", __PRETTY_FUNCTION__); +} + sc_actions sc_report_handler::set_actions(sc_severity, sc_actions) { -- 2.30.2