[lldb/ObjC] Make the NonPointerIsaCache initialization lazy
authorFred Riss <friss@apple.com>
Fri, 13 Mar 2020 23:17:38 +0000 (16:17 -0700)
committerJonas Devlieghere <jonas@devlieghere.com>
Thu, 25 Mar 2021 03:08:06 +0000 (20:08 -0700)
commitc4fee95746caad924cd33ace36bad44a3dbffd79
tree946d5cb8206ee2f54bc843508b8b673fb92282bd
parentff29fdfe4e1390a99f118588b283940ef205f0a8
[lldb/ObjC] Make the NonPointerIsaCache initialization lazy

The objc_debug_isa_class_mask magic value that the objc runtime vends
is now initialized using a static initializer instead of a constant
value. The runtime plugin itself will be initialized before the value
is computed and as a result, the cache will get the wrong value.

Making the creation of the NonPointerIsaCache fully lazy fixes this.
lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.h