summaryrefslogtreecommitdiffstats
path: root/utils/llvm-build/llvmbuild/componentinfo.py
diff options
context:
space:
mode:
Diffstat (limited to 'utils/llvm-build/llvmbuild/componentinfo.py')
-rw-r--r--utils/llvm-build/llvmbuild/componentinfo.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/utils/llvm-build/llvmbuild/componentinfo.py b/utils/llvm-build/llvmbuild/componentinfo.py
index 22ce0b4..30ec23b 100644
--- a/utils/llvm-build/llvmbuild/componentinfo.py
+++ b/utils/llvm-build/llvmbuild/componentinfo.py
@@ -37,6 +37,15 @@ class ComponentInfo(object):
# under.
self.parent = parent
+ # The parent instance, once loaded.
+ self.parent_instance = None
+ self.children = []
+
+ def set_parent_instance(self, parent):
+ assert parent.name == self.parent, "Unexpected parent!"
+ self.parent_instance = parent
+ self.parent_instance.children.append(self)
+
def get_component_references(self):
"""get_component_references() -> iter