Sema: Remove TypeChecker::getTypeOfRValue()

This commit is contained in:
Slava Pestov
2017-05-24 01:55:43 -07:00
parent 2b86bed47e
commit 73976b2134
5 changed files with 21 additions and 33 deletions

View File

@@ -649,7 +649,12 @@ Type TypeChecker::getUnopenedTypeOfReference(VarDecl *value, Type baseType,
if (value->isInvalid())
return ErrorType::get(Context);
Type requestedType = getTypeOfRValue(value, wantInterfaceType);
Type requestedType = (wantInterfaceType
? value->getInterfaceType()
: value->getType());
requestedType = requestedType->getLValueOrInOutObjectType()
->getReferenceStorageReferent();
// If we're dealing with contextual types, and we referenced this type from
// a different context, map the type.