@@ -2024,8 +2024,8 @@ static MetadataAllocator &getResilientMetadataAllocator() {
2024
2024
}
2025
2025
2026
2026
ClassMetadata *
2027
- swift::swift_relocateClassMetadata (ClassDescriptor *description,
2028
- ResilientClassMetadataPattern *pattern) {
2027
+ swift::swift_relocateClassMetadata (const ClassDescriptor *description,
2028
+ const ResilientClassMetadataPattern *pattern) {
2029
2029
auto bounds = description->getMetadataBounds ();
2030
2030
2031
2031
auto metadata = reinterpret_cast <ClassMetadata *>(
@@ -2695,7 +2695,7 @@ swift::swift_updateClassMetadata(ClassMetadata *self,
2695
2695
2696
2696
#ifndef NDEBUG
2697
2697
static bool isAncestorOf (const ClassMetadata *metadata,
2698
- ClassDescriptor *description) {
2698
+ const ClassDescriptor *description) {
2699
2699
auto ancestor = metadata;
2700
2700
while (ancestor && ancestor->isTypeMetadata ()) {
2701
2701
if (ancestor->getDescription () == description)
@@ -2707,9 +2707,9 @@ static bool isAncestorOf(const ClassMetadata *metadata,
2707
2707
#endif
2708
2708
2709
2709
void *
2710
- swift::swift_lookUpClassMethod (ClassMetadata *metadata,
2711
- MethodDescriptor *method,
2712
- ClassDescriptor *description) {
2710
+ swift::swift_lookUpClassMethod (const ClassMetadata *metadata,
2711
+ const MethodDescriptor *method,
2712
+ const ClassDescriptor *description) {
2713
2713
assert (metadata->isTypeMetadata ());
2714
2714
2715
2715
assert (isAncestorOf (metadata, description));
@@ -2722,7 +2722,7 @@ swift::swift_lookUpClassMethod(ClassMetadata *metadata,
2722
2722
assert (index < methods.size ());
2723
2723
2724
2724
auto vtableOffset = vtable->getVTableOffset (description) + index;
2725
- auto *words = reinterpret_cast <void **>(metadata);
2725
+ auto *words = reinterpret_cast <void * const *>(metadata);
2726
2726
2727
2727
return *(words + vtableOffset);
2728
2728
}
0 commit comments