Teach MetadataReader how to handle ObjCClassWrapper metadata.

This commit is contained in:
John McCall
2016-04-26 13:03:15 -07:00
parent 075908008b
commit 92cf4a6d39
5 changed files with 106 additions and 5 deletions

View File

@@ -315,8 +315,12 @@ public:
return WeakStorageType::get(base, Ctx);
}
Type getUnnamedObjCClassType() {
return Type();
Type createObjCClassType(StringRef name) {
Identifier ident = Ctx.getIdentifier(name);
auto typeDecl =
findForeignNominalTypeDecl(ident, Demangle::Node::Kind::Class);
if (!typeDecl) return Type();
return createNominalType(typeDecl, /*parent*/ Type());
}
Type createForeignClassType(StringRef mangledName) {
@@ -584,6 +588,7 @@ RemoteASTTypeBuilder::findForeignNominalTypeDecl(Identifier name,
if (HadError) return;
auto typeDecl = getAcceptableNominalTypeCandidate(decl, ExpectedKind);
if (!typeDecl) return;
if (typeDecl == Result) return;
if (!Result) {
Result = typeDecl;
} else {