@@ -2739,7 +2739,7 @@ struct TargetProtocolConformanceDescriptor final
2739
2739
}
2740
2740
2741
2741
constexpr inline auto
2742
- getTypeDescriptorOffset () const -> typename Runtime::StoredSize {
2742
+ getTypeRefDescriptorOffset () const -> typename Runtime::StoredSize {
2743
2743
return offsetof (typename std::remove_reference<decltype (*this )>::type, TypeRef);
2744
2744
}
2745
2745
@@ -2918,6 +2918,11 @@ struct TargetContextDescriptor {
2918
2918
: 0 ;
2919
2919
}
2920
2920
2921
+ constexpr inline auto
2922
+ getParentOffset () const -> typename Runtime::StoredSize {
2923
+ return offsetof (typename std::remove_reference<decltype (*this )>::type, Parent);
2924
+ }
2925
+
2921
2926
#ifndef NDEBUG
2922
2927
LLVM_ATTRIBUTE_DEPRECATED (void dump () const ,
2923
2928
"only for use in the debugger");
@@ -2957,13 +2962,26 @@ struct TargetModuleContextDescriptor final : TargetContextDescriptor<Runtime> {
2957
2962
return isCImportedModuleName (Name.get ());
2958
2963
}
2959
2964
2965
+ constexpr inline auto
2966
+ getNameOffset () const -> typename Runtime::StoredSize {
2967
+ return offsetof (typename std::remove_reference<decltype (*this )>::type, Name);
2968
+ }
2969
+
2960
2970
static bool classof (const TargetContextDescriptor<Runtime> *cd) {
2961
2971
return cd->getKind () == ContextDescriptorKind::Module;
2962
2972
}
2963
2973
};
2964
2974
2965
2975
using ModuleContextDescriptor = TargetModuleContextDescriptor<InProcess>;
2966
2976
2977
+ template <unsigned PointerSize>
2978
+ using ExternalModuleContextDescriptor
2979
+ #if SWIFT_OBJC_INTEROP
2980
+ = TargetModuleContextDescriptor<External<WithObjCInterop<RuntimeTarget<PointerSize>>>>;
2981
+ #else
2982
+ = TargetModuleContextDescriptor<External<NoObjCInterop<RuntimeTarget<PointerSize>>>>;
2983
+ #endif
2984
+
2967
2985
template <typename Runtime>
2968
2986
inline bool TargetContextDescriptor<Runtime>::isCImportedContext() const {
2969
2987
return getModuleContext ()->isCImportedContext ();
0 commit comments