Skip to content

Commit e84c6cc

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 ffd4236 commit e84c6cc

File tree

6 files changed

+311
-156
lines changed

6 files changed

+311
-156
lines changed

0 commit comments

Comments
 (0)