systemc: Wrap some report maps in functions.
authorGabe Black <gabeblack@google.com>
Wed, 7 Nov 2018 01:48:58 +0000 (17:48 -0800)
committerGabe Black <gabeblack@google.com>
Fri, 9 Nov 2018 01:25:15 +0000 (01:25 +0000)
commit1c110fafffdf82034e34146f90729ad92865238d
tree111b229ec0ee422f73b3a1495648c1506e8ec348
parent121160d97f3d41220a26d3371a277434c3defea3
systemc: Wrap some report maps in functions.

By declaring the map as a static variable in that function and then
returning it, we can guarantee that it's initialized relative to other
static initializers so that we don't try to use a data structure that
isn't constructed yet. This will let us get rid of the dependence on
python for setting up that mapping.

Change-Id: I031ce2039de8f5f79fbb9d76cf1363f15207b64b
Reviewed-on: https://gem5-review.googlesource.com/c/13975
Maintainer: Gabe Black <gabeblack@google.com>
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
src/systemc/utils/report.cc
src/systemc/utils/report.hh
src/systemc/utils/sc_report.cc
src/systemc/utils/sc_report_handler.cc