@@ -231,10 +231,12 @@ namespace {
231
231
232
232
// / An implementation of the generic ReflectionContextInterface that
233
233
// / is templatized on target pointer width and specialized to either
234
- // / 32-bit or 64-bit pointers, with and without ObjC interoperability .
235
- template <typename ReflectionContext >
234
+ // / 32-bit or 64-bit pointers.
235
+ template <unsigned PointerSize >
236
236
class TargetReflectionContext
237
237
: public SwiftLanguageRuntimeImpl::ReflectionContextInterface {
238
+ using ReflectionContext = swift::reflection::ReflectionContext<
239
+ swift::External<swift::RuntimeTarget<PointerSize>>>;
238
240
ReflectionContext m_reflection_ctx;
239
241
240
242
public:
@@ -346,30 +348,14 @@ class TargetReflectionContext
346
348
347
349
std::unique_ptr<SwiftLanguageRuntimeImpl::ReflectionContextInterface>
348
350
SwiftLanguageRuntimeImpl::ReflectionContextInterface::CreateReflectionContext32 (
349
- std::shared_ptr<swift::remote::MemoryReader> reader, bool ObjCInterop) {
350
- using ReflectionContext32ObjCInterop =
351
- TargetReflectionContext<swift::reflection::ReflectionContext<
352
- swift::External<swift::WithObjCInterop<swift::RuntimeTarget<4 >>>>>;
353
- using ReflectionContext32NoObjCInterop =
354
- TargetReflectionContext<swift::reflection::ReflectionContext<
355
- swift::External<swift::NoObjCInterop<swift::RuntimeTarget<4 >>>>>;
356
- if (ObjCInterop)
357
- return std::make_unique<ReflectionContext32ObjCInterop>(reader);
358
- return std::make_unique<ReflectionContext32NoObjCInterop>(reader);
351
+ std::shared_ptr<swift::remote::MemoryReader> reader) {
352
+ return std::make_unique<TargetReflectionContext<4 >>(reader);
359
353
}
360
354
361
355
std::unique_ptr<SwiftLanguageRuntimeImpl::ReflectionContextInterface>
362
356
SwiftLanguageRuntimeImpl::ReflectionContextInterface::CreateReflectionContext64 (
363
- std::shared_ptr<swift::remote::MemoryReader> reader, bool ObjCInterop) {
364
- using ReflectionContext64ObjCInterop =
365
- TargetReflectionContext<swift::reflection::ReflectionContext<
366
- swift::External<swift::WithObjCInterop<swift::RuntimeTarget<8 >>>>>;
367
- using ReflectionContext64NoObjCInterop =
368
- TargetReflectionContext<swift::reflection::ReflectionContext<
369
- swift::External<swift::NoObjCInterop<swift::RuntimeTarget<8 >>>>>;
370
- if (ObjCInterop)
371
- return std::make_unique<ReflectionContext64ObjCInterop>(reader);
372
- return std::make_unique<ReflectionContext64NoObjCInterop>(reader);
357
+ std::shared_ptr<swift::remote::MemoryReader> reader) {
358
+ return std::make_unique<TargetReflectionContext<8 >>(reader);
373
359
}
374
360
375
361
SwiftLanguageRuntimeImpl::ReflectionContextInterface::
0 commit comments