Fixed a bug where if something went wrong while

constructing the ObjCInterfaceDecl for an ISA,
we'd continue and try to use that Decl anyway,
possibly causing a crash.

llvm-svn: 164844
This commit is contained in:
Sean Callanan 2012-09-28 20:47:47 +00:00
parent b7243855d9
commit d473424d53
1 changed files with 4 additions and 0 deletions

View File

@ -640,6 +640,8 @@ AppleObjCTypeVendor::FindTypes (const ConstString &name,
log->Printf("AOCTV::FT [%u] Couldn't get the Objective-C interface for isa 0x%llx",
current_id,
(uint64_t)isa);
break;
}
clang::QualType new_iface_type = ast_ctx->getObjCInterfaceType(iface_decl);
@ -651,6 +653,8 @@ AppleObjCTypeVendor::FindTypes (const ConstString &name,
current_id,
dumper.GetCString(),
(uint64_t)isa);
break;
}
types.push_back(ClangASTType(ast_ctx, new_iface_type.getAsOpaquePtr()));