diff options
author | Sean Callanan <scallanan@apple.com> | 2012-09-11 21:44:01 +0000 |
---|---|---|
committer | Sean Callanan <scallanan@apple.com> | 2012-09-11 21:44:01 +0000 |
commit | bc47dfcba2644d7dbc466afa7fa2c1778e4fa4cf (patch) | |
tree | e540e225d35adca9b310077b8692e5271cc3492a /lldb/source/Target/ObjCLanguageRuntime.cpp | |
parent | 822ab6b2e4a76bbd9abb790d67b0ec030beb79ed (diff) | |
download | bcm5719-llvm-bc47dfcba2644d7dbc466afa7fa2c1778e4fa4cf.tar.gz bcm5719-llvm-bc47dfcba2644d7dbc466afa7fa2c1778e4fa4cf.zip |
This patch is part of ongoing work to extract type
information from the Objective-C runtime.
This patch takes the old AppleObjCSymbolVendor and
replaces it with an AppleObjCTypeVendor, which is
much more lightweight. Specifically, the SymbolVendor
needs to pretend that there is a backing symbol file
for the Types it vends, whereas a TypeVendor only
vends bare ClangASTTypes. These ClangASTTypes only
need to exist in an ASTContext.
The ClangASTSource now falls back to the runtime's
TypeVendor (if one exists) if the debug information
doesn't find a complete type for a particular
Objective-C interface. The runtime's TypeVendor
maintains an ASTContext full of types it knows about,
and re-uses the ISA-based type query information used
by the ValueObjects.
Currently, the runtime's TypeVendor doesn't provide
useful answers because we haven't yet implemented a
way to iterate across all ISAs contained in the target
process's runtime. That's the next step.
llvm-svn: 163651
Diffstat (limited to 'lldb/source/Target/ObjCLanguageRuntime.cpp')
-rw-r--r-- | lldb/source/Target/ObjCLanguageRuntime.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lldb/source/Target/ObjCLanguageRuntime.cpp b/lldb/source/Target/ObjCLanguageRuntime.cpp index a404ce40c2d..df00c353c4a 100644 --- a/lldb/source/Target/ObjCLanguageRuntime.cpp +++ b/lldb/source/Target/ObjCLanguageRuntime.cpp @@ -281,6 +281,16 @@ ObjCLanguageRuntime::ClassDescriptor::IsPointerValid (lldb::addr_t value, } ObjCLanguageRuntime::ObjCISA +ObjCLanguageRuntime::GetISA(const ConstString &name) +{ + for (const ISAToDescriptorMap::value_type &val : m_isa_to_descriptor_cache) + if (val.second && val.second->GetClassName() == name) + return val.first; + + return 0; +} + +ObjCLanguageRuntime::ObjCISA ObjCLanguageRuntime::GetParentClass(ObjCLanguageRuntime::ObjCISA isa) { if (!IsValidISA(isa)) |