Skip to content

Commit 3868aaa

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.
1 parent bc3f984 commit 3868aaa

File tree

6 files changed

+797
-629
lines changed

6 files changed

+797
-629
lines changed

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

+2
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)