Skip to content

Commit adb7bf5

Browse files
committed
IRGen: Replace some calls to getDeclaredType() with getDeclaredInterfaceType()
1 parent b4ea644 commit adb7bf5

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

lib/IRGen/GenBuiltin.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,7 @@ if (Builtin.ID == BuiltinValueKind::id) { \
410410
auto error = args.claimNext();
411411
auto errorBuffer = IGF.getErrorResultSlot(
412412
SILType::getPrimitiveObjectType(IGF.IGM.Context.getErrorDecl()
413-
->getDeclaredType()
413+
->getDeclaredInterfaceType()
414414
->getCanonicalType()));
415415
IGF.Builder.CreateStore(error, errorBuffer);
416416

lib/IRGen/GenReflection.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -780,8 +780,8 @@ class FieldTypeMetadataBuilder : public ReflectionMetadataBuilder {
780780
auto *PD = dyn_cast<ProtocolDecl>(NTD);
781781
if (CD && CD->getSuperclass()) {
782782
addTypeRef(CD->getSuperclass(), CD->getGenericSignature());
783-
} else if (PD && PD->getDeclaredType()->getSuperclass()) {
784-
addTypeRef(PD->getDeclaredType()->getSuperclass(),
783+
} else if (PD && PD->getDeclaredInterfaceType()->getSuperclass()) {
784+
addTypeRef(PD->getDeclaredInterfaceType()->getSuperclass(),
785785
PD->getGenericSignature());
786786
} else {
787787
B.addInt32(0);

lib/IRGen/IRGenDebugInfo.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -948,7 +948,7 @@ class IRGenDebugInfoImpl : public IRGenDebugInfo {
948948
} else {
949949
// Discriminated union case without argument. Fallback to Int
950950
// as the element type; there is no storage here.
951-
Type IntTy = IGM.Context.getIntDecl()->getDeclaredType();
951+
Type IntTy = IGM.Context.getIntDecl()->getDeclaredInterfaceType();
952952
ElemDbgTy = DebugTypeInfo(IntTy, DbgTy.getStorageType(), Size(0),
953953
Alignment(1), true, false);
954954
}

0 commit comments

Comments
 (0)