[AppleObjCRuntime] Don't bother looking for the runtime on non-apple targets
Summary: This short-circuits the GetObjCVersion function to avoid iterating through target modules on non-apple targets. This function is called on every Process::IsDynamicValue call, so this overhead is not negligible. Reviewers: clayborg, jingham Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D13948 llvm-svn: 251004
This commit is contained in:
parent
02f1c5d132
commit
31bcd2bddd
|
|
@ -382,8 +382,11 @@ AppleObjCRuntime::GetObjCVersion (Process *process, ModuleSP &objc_module_sp)
|
|||
{
|
||||
if (!process)
|
||||
return ObjCRuntimeVersions::eObjC_VersionUnknown;
|
||||
|
||||
|
||||
Target &target = process->GetTarget();
|
||||
if (target.GetArchitecture().GetTriple().getVendor() != llvm::Triple::VendorType::Apple)
|
||||
return ObjCRuntimeVersions::eObjC_VersionUnknown;
|
||||
|
||||
const ModuleList &target_modules = target.GetImages();
|
||||
Mutex::Locker modules_locker(target_modules.GetMutex());
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue