File tree Expand file tree Collapse file tree 1 file changed +19
-1
lines changed Expand file tree Collapse file tree 1 file changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -315,7 +315,8 @@ enum class ProtocolDispatchStrategy: uint8_t {
315
315
class GenericParameterDescriptorFlags {
316
316
typedef uint16_t int_type;
317
317
enum : int_type {
318
- HasVTable = 0x0004 ,
318
+ HasVTable = 0x0004 ,
319
+ HasResilientSuperclass = 0x0008 ,
319
320
};
320
321
int_type Data;
321
322
@@ -335,6 +336,23 @@ class GenericParameterDescriptorFlags {
335
336
return Data & HasVTable;
336
337
}
337
338
339
+ constexpr GenericParameterDescriptorFlags withHasResilientSuperclass (bool b) const {
340
+ return GenericParameterDescriptorFlags (b ? (Data | HasResilientSuperclass)
341
+ : (Data & ~HasResilientSuperclass));
342
+ }
343
+
344
+ // / If this type is a class, does it have a resilient superclass?
345
+ // / If so, the generic parameter offset, field offset vector offset
346
+ // / and vtable start offsets are relative to the start of the class's
347
+ // / immediate members in the metadata, and not the start of the
348
+ // / metadata itself.
349
+ // /
350
+ // / Note that the immediate members begin at the same offset where the
351
+ // / superclass metadata ends.
352
+ bool hasResilientSuperclass () const {
353
+ return Data & HasResilientSuperclass;
354
+ }
355
+
338
356
int_type getIntValue () const {
339
357
return Data;
340
358
}
You can’t perform that action at this time.
0 commit comments