diff options
author | Gabe Black <gabeblack@google.com> | 2018-08-22 21:54:19 -0700 |
---|---|---|
committer | Gabe Black <gabeblack@google.com> | 2018-09-25 23:59:32 +0000 |
commit | 5a4407b3b693ca22a80f4aa1359c6ccf3f27f694 (patch) | |
tree | cef6f26bfaa475e3ae420108ec7ec187fd13d533 /src | |
parent | 6184742caf7f80a8b2763bfc31c65789b5dab801 (diff) | |
download | gem5-5a4407b3b693ca22a80f4aa1359c6ccf3f27f694.tar.xz |
systemc: Handle null sc_object names.
A null pointer for an sc_object name is supposed to be equivalent to
an empty string.
Change-Id: I6094577ad43f13d47a20bc67fa15f4c04d448fe5
Reviewed-on: https://gem5-review.googlesource.com/12257
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/systemc/core/object.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/systemc/core/object.cc b/src/systemc/core/object.cc index e066a239f..1fb1d4591 100644 --- a/src/systemc/core/object.cc +++ b/src/systemc/core/object.cc @@ -72,7 +72,7 @@ popObject(Objects *objects, const std::string &name) Object::Object(sc_core::sc_object *_sc_obj) : Object(_sc_obj, "object") {} Object::Object(sc_core::sc_object *_sc_obj, const char *obj_name) : - _sc_obj(_sc_obj), _basename(obj_name), parent(nullptr) + _sc_obj(_sc_obj), _basename(obj_name ? obj_name : ""), parent(nullptr) { if (_basename == "") _basename = "object"; |