Skip to content

Commit fede775

Browse files
committed
Make Objective-C interoperability configurable in the runtime
In order to be able to debug, for example, a Linux process from a macOS host, we need to be able to initialize a ReflectionContext without Objective-C interoperability. This patch turns ObjCInterOp into another template trait, so it's possible to instantiate a non-ObjC MetadataReader on a system built with ObjC-interop (but not vice versa). This patch changes the class hierarchy to TargetMetadata<Runtime> | TargetHeapMetadata<Runtime> | TargetAnyClassMetadata<Runtime> / \ / TargetAnyClassMetadataObjCInterop<Runtime> / \ TargetClassMetadata<Runtime, TargetAnyClassMetadata<Runtime>> \ \ TargetClassMetadata<Runtime, TargetAnyClassMetadataObjCInterop<Runtime>> TargetAnyClassMetadataObjCInterop inherits from TargetAnyClassMetadata because most of the implementation is the same. This choice makes TargetClassMetadata a bit tricky. In this patch I went with templating the parent class. rdar://87179578
1 parent 477b4d6 commit fede775

File tree

7 files changed

+335
-191
lines changed

7 files changed

+335
-191
lines changed

0 commit comments

Comments
 (0)