Fixed a crash when dealing with an empty method name in the ObjC runtime.

I've filed a bug covering better unit testing of our runtime metadata reader, which will allow this to be testable.. 

<rdar://problem/31793264>

llvm-svn: 301461
This commit is contained in:
Sean Callanan 2017-04-26 20:36:47 +00:00
parent 3e519b949b
commit 5652d5eb09
1 changed files with 6 additions and 1 deletions

View File

@ -355,9 +355,14 @@ public:
}
}
clang::IdentifierInfo **identifier_infos = selector_components.data();
if (!identifier_infos) {
return NULL;
}
clang::Selector sel = ast_ctx.Selectors.getSelector(
is_zero_argument ? 0 : selector_components.size(),
selector_components.data());
identifier_infos);
clang::QualType ret_type =
ClangUtil::GetQualType(type_realizer_sp->RealizeType(