Skip to content

Commit 53ff62e

Browse files
committed
SILGen: Simplify getBaseFormalType()
1 parent 2aac886 commit 53ff62e

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

lib/SILGen/SILGenLValue.cpp

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2748,14 +2748,7 @@ static SGFAccessKind getBaseAccessKind(SILGenModule &SGM,
27482748
}
27492749

27502750
static CanType getBaseFormalType(Expr *baseExpr) {
2751-
auto type = baseExpr->getType()->getCanonicalType();
2752-
if (auto lv = dyn_cast<LValueType>(type)) {
2753-
return lv.getObjectType();
2754-
} else if (auto inout = dyn_cast<InOutType>(type)) {
2755-
return inout.getObjectType();
2756-
} else {
2757-
return type;
2758-
}
2751+
return baseExpr->getType()->getWithoutSpecifierType()->getCanonicalType();
27592752
}
27602753

27612754
LValue SILGenLValue::visitMemberRefExpr(MemberRefExpr *e,

0 commit comments

Comments
 (0)