From aa39374b419c535dd56145ffebcef97c8c20eb39 Mon Sep 17 00:00:00 2001 From: Matthew Woehlke Date: Fri, 20 Feb 2015 16:31:23 -0500 Subject: Don't ignore classes in topology When building the class topology, don't skip classes, even if we are not going to generate code for them. This is necessary to get the topology order correct in a case such as C derived from B derived from A, where B is not generated, but initializing C depends on A being initialized first. Without this change, there is no guaranteed ordering between A and C in such a case. (In particular, this comes up in the Photon test; Photon::ValueIdentity derives from Photon::TemplateBase, which derives from Photon::Base. However, this was not being reflected in the topology, and as a result, it was just luck that the initialization order was correct anyway.) Change-Id: I4b99a50acef3b06e77100a70f2db8236d06af2be Reviewed-by: John Cummings --- ApiExtractor/abstractmetabuilder.cpp | 3 --- 1 file changed, 3 deletions(-) (limited to 'ApiExtractor/abstractmetabuilder.cpp') diff --git a/ApiExtractor/abstractmetabuilder.cpp b/ApiExtractor/abstractmetabuilder.cpp index ebb3134ec..f956d7c08 100644 --- a/ApiExtractor/abstractmetabuilder.cpp +++ b/ApiExtractor/abstractmetabuilder.cpp @@ -2952,9 +2952,6 @@ AbstractMetaClassList AbstractMetaBuilder::classesTopologicalSorted(const Abstra QRegExp regex1("\\(.*\\)"); QRegExp regex2("::.*"); foreach (AbstractMetaClass* clazz, classList) { - if (clazz->isInterface() || !clazz->typeEntry()->generateCode()) - continue; - if (clazz->enclosingClass() && map.contains(clazz->enclosingClass()->qualifiedCppName())) graph.addEdge(map[clazz->enclosingClass()->qualifiedCppName()], map[clazz->qualifiedCppName()]); -- cgit v1.2.3