This is an archive of the discontinued LLVM Phabricator instance.

[AppleObjCRuntime] Don't bother looking for the runtime on non-apple targets
ClosedPublic

Authored by labath on Oct 21 2015, 8:53 AM.

Details

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.

Diff Detail

Repository
rL LLVM

Event Timeline

labath updated this revision to Diff 38020.Oct 21 2015, 8:53 AM
labath retitled this revision from to [AppleObjCRuntime] Don't bother looking for the runtime on non-apple targets.
labath updated this object.
labath added reviewers: clayborg, jingham.
labath added a subscriber: lldb-commits.
clayborg accepted this revision.Oct 21 2015, 10:45 AM
clayborg edited edge metadata.

This is really the fault of AppleObjCRuntimeV1::CreateInstance() and AppleObjCRuntimeV2::CreateInstance() not checking the triple to begin with, but this is a simple solution that will effectively fix both places. Looks good.

This revision is now accepted and ready to land.Oct 21 2015, 10:45 AM
This revision was automatically updated to reflect the committed changes.