mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-22 10:06:08 +00:00

We added support for the GNUstep ObjC runtime in 0b6264738f3d. In order to check if the target process uses GNUstep we run an expensive symbol lookup in `CreateInstance()`. This turned out to cause a heavy performance regression for non-GNUstep inferiors. This patch puts a cheaper check in front, so that the vast majority of requests should return early. This should fix the symptom for the moment. The conceptual question remains: Why does `LanguageRuntime::FindPlugin` invoke `create_callback` for each available runtime unconditionally in every `Process::ModulesDidLoad`? Reviewed By: jasonmolenda, jingham, bulbazord Differential Revision: https://reviews.llvm.org/D158205 (cherry picked from commit af2eb838309d88f046d34bca6055f1de6078fa3b)