Skip to content

Commit 5f19fdf

Browse files
authored
Merge pull request #59769 from hborla/5.7-irgen-anyobject
[5.7][IRGen] Use existential AnyObject throughout IRGen.
2 parents 76886c1 + b006ce7 commit 5f19fdf

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
@@ -1501,7 +1501,7 @@ emitAssociatedTypeMetadataRecord(const RootProtocolConformance *conformance) {
15011501
void IRGenModule::emitBuiltinReflectionMetadata() {
15021502
if (getSwiftModule()->isStdlibModule()) {
15031503
BuiltinTypes.insert(Context.TheNativeObjectType);
1504-
BuiltinTypes.insert(Context.getAnyObjectConstraint());
1504+
BuiltinTypes.insert(Context.getAnyObjectType());
15051505
BuiltinTypes.insert(Context.TheBridgeObjectType);
15061506
BuiltinTypes.insert(Context.TheRawPointerType);
15071507
BuiltinTypes.insert(Context.TheUnsafeValueBufferType);

lib/IRGen/MetadataRequest.cpp

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

32393239
llvm_unreachable("Not a valid SILFunctionType.");
@@ -3354,7 +3354,7 @@ namespace {
33543354
|| t == C.TheNativeObjectType
33553355
|| t == C.TheBridgeObjectType
33563356
|| t == C.TheRawPointerType
3357-
|| t == C.getAnyObjectConstraint())
3357+
|| t == C.getAnyObjectType())
33583358
return true;
33593359
if (auto intTy = dyn_cast<BuiltinIntegerType>(t)) {
33603360
auto width = intTy->getWidth();
@@ -3436,7 +3436,7 @@ namespace {
34363436
}
34373437
case SILFunctionType::Representation::Block:
34383438
// All block types look like AnyObject.
3439-
return emitFromValueWitnessTable(C.getAnyObjectConstraint());
3439+
return emitFromValueWitnessTable(C.getAnyObjectType());
34403440
}
34413441

34423442
llvm_unreachable("Not a valid SILFunctionType.");
@@ -3479,7 +3479,7 @@ namespace {
34793479
case ReferenceCounting::ObjC:
34803480
case ReferenceCounting::Block:
34813481
case ReferenceCounting::Unknown:
3482-
return emitFromValueWitnessTable(IGF.IGM.Context.getAnyObjectConstraint());
3482+
return emitFromValueWitnessTable(IGF.IGM.Context.getAnyObjectType());
34833483

34843484
case ReferenceCounting::Bridge:
34853485
case ReferenceCounting::Error:

lib/SIL/IR/TypeLowering.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -442,7 +442,7 @@ namespace {
442442
if (auto superclassType = genericSig->getSuperclassBound(type))
443443
return superclassType;
444444
assert(genericSig->requiresClass(type));
445-
return TC.Context.getAnyObjectConstraint();
445+
return TC.Context.getAnyObjectType();
446446
}
447447

448448
return type;

0 commit comments

Comments
 (0)