Skip to content

Commit 5f6b126

Browse files
authored
Merge pull request #59760 from hborla/irgen-anyobject
[IRGen] Use existential AnyObject throughout IRGen.
2 parents 087eba8 + 574f01a commit 5f6b126

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

lib/IRGen/GenReflection.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1499,7 +1499,7 @@ emitAssociatedTypeMetadataRecord(const RootProtocolConformance *conformance) {
14991499
void IRGenModule::emitBuiltinReflectionMetadata() {
15001500
if (getSwiftModule()->isStdlibModule()) {
15011501
BuiltinTypes.insert(Context.TheNativeObjectType);
1502-
BuiltinTypes.insert(Context.getAnyObjectConstraint());
1502+
BuiltinTypes.insert(Context.getAnyObjectType());
15031503
BuiltinTypes.insert(Context.TheBridgeObjectType);
15041504
BuiltinTypes.insert(Context.TheRawPointerType);
15051505
BuiltinTypes.insert(Context.TheUnsafeValueBufferType);

lib/IRGen/MetadataRequest.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3232,7 +3232,7 @@ class EmitTypeMetadataRefForLayout
32323232
}
32333233
case SILFunctionType::Representation::Block:
32343234
// All block types look like AnyObject.
3235-
return C.getAnyObjectConstraint();
3235+
return C.getAnyObjectType();
32363236
}
32373237

32383238
llvm_unreachable("Not a valid SILFunctionType.");
@@ -3353,7 +3353,7 @@ namespace {
33533353
|| t == C.TheNativeObjectType
33543354
|| t == C.TheBridgeObjectType
33553355
|| t == C.TheRawPointerType
3356-
|| t == C.getAnyObjectConstraint())
3356+
|| t == C.getAnyObjectType())
33573357
return true;
33583358
if (auto intTy = dyn_cast<BuiltinIntegerType>(t)) {
33593359
auto width = intTy->getWidth();
@@ -3435,7 +3435,7 @@ namespace {
34353435
}
34363436
case SILFunctionType::Representation::Block:
34373437
// All block types look like AnyObject.
3438-
return emitFromValueWitnessTable(C.getAnyObjectConstraint());
3438+
return emitFromValueWitnessTable(C.getAnyObjectType());
34393439
}
34403440

34413441
llvm_unreachable("Not a valid SILFunctionType.");
@@ -3478,7 +3478,7 @@ namespace {
34783478
case ReferenceCounting::ObjC:
34793479
case ReferenceCounting::Block:
34803480
case ReferenceCounting::Unknown:
3481-
return emitFromValueWitnessTable(IGF.IGM.Context.getAnyObjectConstraint());
3481+
return emitFromValueWitnessTable(IGF.IGM.Context.getAnyObjectType());
34823482

34833483
case ReferenceCounting::Bridge:
34843484
case ReferenceCounting::Error:

lib/SIL/IR/TypeLowering.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -477,7 +477,7 @@ namespace {
477477
if (auto superclassType = genericSig->getSuperclassBound(type))
478478
return superclassType;
479479
assert(genericSig->requiresClass(type));
480-
return TC.Context.getAnyObjectConstraint();
480+
return TC.Context.getAnyObjectType();
481481
}
482482

483483
return type;

0 commit comments

Comments
 (0)