Push get/setInterfaceType() up to ValueDecl.

No functionality change here.


Swift SVN r9552
This commit is contained in:
Doug Gregor
2013-10-21 19:05:02 +00:00
parent 63c264446d
commit cd0299f85a
5 changed files with 44 additions and 36 deletions

View File

@@ -883,12 +883,10 @@ void Serializer::writeCrossReference(const Decl *D) {
// Otherwise, use the value's type for disambiguation.
Type ty;
if (!isa<TypeDecl>(value)) {
// If this function has an interface type, use its canonicalized form.
if (auto func = dyn_cast<AbstractFunctionDecl>(value)) {
ty = func->getInterfaceType();
if (ty)
ty = ty->getCanonicalType();
}
// If this value has an interface type, use its canonicalized form.
ty = value->getInterfaceType();
if (ty)
ty = ty->getCanonicalType();
if (!ty)
ty = value->getType();