mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Reflection: Fix class layout start offset calculations
Fixes <rdar://problem/29115967>.
This commit is contained in:
@@ -93,16 +93,13 @@ public:
|
||||
// by looking at the size of the superclass
|
||||
bool valid;
|
||||
unsigned size, align;
|
||||
auto super =
|
||||
this->readSuperClassFromClassMetadata(MetadataAddress);
|
||||
if (super) {
|
||||
std::tie(valid, size, align) =
|
||||
this->readInstanceSizeAndAlignmentFromClassMetadata(super);
|
||||
std::tie(valid, size, align) =
|
||||
this->readInstanceSizeAndAlignmentFromClassMetadata(MetadataAddress);
|
||||
|
||||
// Perform layout
|
||||
if (valid)
|
||||
TI = TC.getClassInstanceTypeInfo(TR, size, align);
|
||||
|
||||
// Perform layout
|
||||
if (valid)
|
||||
TI = TC.getClassInstanceTypeInfo(TR, size, align);
|
||||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user