diff --git a/src/systemc/utils/report.cc b/src/systemc/utils/report.cc index 9c26edea37..755542fd63 100644 --- a/src/systemc/utils/report.cc +++ b/src/systemc/utils/report.cc @@ -63,4 +63,11 @@ std::unique_ptr globalReportCache; bool reportWarningsAsErrors = false; +DefaultReportMessages::DefaultReportMessages( + std::initializer_list> msgs) +{ + for (auto &p: msgs) + sc_core::sc_report::register_id(p.first, p.second); +} + } // namespace sc_gem5 diff --git a/src/systemc/utils/report.hh b/src/systemc/utils/report.hh index e0b2e2598d..ddbf62fa50 100644 --- a/src/systemc/utils/report.hh +++ b/src/systemc/utils/report.hh @@ -30,9 +30,11 @@ #ifndef __SYSTEMC_UTILS_REPORT_HH__ #define __SYSTEMC_UTILS_REPORT_HH__ +#include #include #include #include +#include #include "systemc/ext/utils/sc_report.hh" #include "systemc/ext/utils/sc_report_handler.hh" @@ -106,6 +108,12 @@ extern std::unique_ptr globalReportCache; extern bool reportWarningsAsErrors; +struct DefaultReportMessages +{ + public: + DefaultReportMessages(std::initializer_list>); +}; + } // namespace sc_gem5 #endif // __SYSTEMC_UTILS_REPORT_HH__