@@ -2053,8 +2053,8 @@ static MetadataAllocator &getResilientMetadataAllocator() {
2053
2053
}
2054
2054
2055
2055
ClassMetadata *
2056
- swift::swift_relocateClassMetadata (ClassDescriptor *description,
2057
- ResilientClassMetadataPattern *pattern) {
2056
+ swift::swift_relocateClassMetadata (const ClassDescriptor *description,
2057
+ const ResilientClassMetadataPattern *pattern) {
2058
2058
auto bounds = description->getMetadataBounds ();
2059
2059
2060
2060
auto metadata = reinterpret_cast <ClassMetadata *>(
@@ -2724,7 +2724,7 @@ swift::swift_updateClassMetadata(ClassMetadata *self,
2724
2724
2725
2725
#ifndef NDEBUG
2726
2726
static bool isAncestorOf (const ClassMetadata *metadata,
2727
- ClassDescriptor *description) {
2727
+ const ClassDescriptor *description) {
2728
2728
auto ancestor = metadata;
2729
2729
while (ancestor && ancestor->isTypeMetadata ()) {
2730
2730
if (ancestor->getDescription () == description)
@@ -2736,9 +2736,9 @@ static bool isAncestorOf(const ClassMetadata *metadata,
2736
2736
#endif
2737
2737
2738
2738
void *
2739
- swift::swift_lookUpClassMethod (ClassMetadata *metadata,
2740
- MethodDescriptor *method,
2741
- ClassDescriptor *description) {
2739
+ swift::swift_lookUpClassMethod (const ClassMetadata *metadata,
2740
+ const MethodDescriptor *method,
2741
+ const ClassDescriptor *description) {
2742
2742
assert (metadata->isTypeMetadata ());
2743
2743
2744
2744
assert (isAncestorOf (metadata, description));
@@ -2751,7 +2751,7 @@ swift::swift_lookUpClassMethod(ClassMetadata *metadata,
2751
2751
assert (index < methods.size ());
2752
2752
2753
2753
auto vtableOffset = vtable->getVTableOffset (description) + index;
2754
- auto *words = reinterpret_cast <void **>(metadata);
2754
+ auto *words = reinterpret_cast <void * const *>(metadata);
2755
2755
2756
2756
return *(words + vtableOffset);
2757
2757
}
0 commit comments