From: Gabe Black <gabeblack@google.com>
Date: Mon, 25 Sep 2017 22:53:38 +0000 (-0700)
Subject: sim: Add a NullSimObject.descendants function.
X-Git-Tag: v19.0.0.0~2623
X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2a02e3d30de151518f6b769c59b4585b817af22c;p=gem5.git

sim: Add a NullSimObject.descendants function.

Null simobjects don't have any descendants.

Change-Id: Ia43a99056709f422c9c817c017912d23d689fb1e
Reviewed-on: https://gem5-review.googlesource.com/4844
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Gabe Black <gabeblack@google.com>
---

diff --git a/src/python/m5/params.py b/src/python/m5/params.py
index 6c3c47e95..f9412d70e 100644
--- a/src/python/m5/params.py
+++ b/src/python/m5/params.py
@@ -1716,6 +1716,10 @@ class NullSimObject(object):
     def clear_parent(self, old_parent):
         pass
 
+    def descendants(self):
+        return
+        yield None
+
     def __str__(self):
         return 'Null'