Skip to content

Commit cdb6da0

Browse files
committed
[lldb] Factor out iteration over runtime types from GetChildCompilerTypeAtIndex()
This patch introduces a new class SwiftRuntimeTypeVisitor that exists to unify iteration over runtime type information. The visitor callback has closure parameters that can be called to make additional expensive queries on a child. TODO: This is not the final evolution step. - We probably should remove the "depth" parameter entirely and implement the access path computation for GetIndexOfChildMemberWithName at a different layer. - We could cache the results for the last execution context. Relanding with an off-by-one error fixed in GetExistentialSyntheticChildren that was caught by ASAN!
1 parent 784a8a8 commit cdb6da0

File tree

6 files changed

+813
-631
lines changed

6 files changed

+813
-631
lines changed

lldb/source/Plugins/LanguageRuntime/Swift/SwiftLanguageRuntime.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,8 @@ struct SuperClassType;
6767
using ThreadSafeReflectionContext = LockGuarded<ReflectionContextInterface>;
6868

6969
class SwiftLanguageRuntime : public LanguageRuntime {
70+
friend class SwiftRuntimeTypeVisitor;
71+
7072
protected:
7173
SwiftLanguageRuntime(Process &process);
7274

0 commit comments

Comments
 (0)