Reflection: ProtocolTypeRefs now store a mangled name

This is better for field metadata lookups. Clients that want the
module name and decl name can demangle, just like they do with
NominalTypeRefs.
This commit is contained in:
Slava Pestov
2016-04-25 14:56:50 -07:00
parent 00e0c89b30
commit c0c02a3148
6 changed files with 50 additions and 35 deletions

View File

@@ -246,7 +246,9 @@ public:
return FunctionType::get(input, output, einfo);
}
Type createProtocolType(StringRef moduleName, StringRef protocolName) {
Type createProtocolType(StringRef mangledName,
StringRef moduleName,
StringRef protocolName) {
auto module = Ctx.getModuleByName(moduleName);
if (!module) return Type();