-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Make Objective-C interoperability configurable in the runtime #40927
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
test with swiftlang/llvm-project#3823 |
Build failed |
Build failed |
63d8228
to
b3b428b
Compare
test with swiftlang/llvm-project#3823 |
Build failed |
Build failed |
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
b3b428b
to
fede775
Compare
test with swiftlang/llvm-project#3823 |
Build failed |
test with swiftlang/llvm-project#3823 |
This fixes the build on Windows by fixing the template code. The template type was not qualified and caused an ambiguity in the name resolution with the local typename and the previously declared namespaced name.
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
TargetClassMetadata<Runtime, TargetAnyClassMetadata>
TargetClassMetadata<Runtime, TargetAnyClassMetadataObjCInterop>
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
Relands #40843