Fixed a bug exposed by fixing the assert in previous patch (one of the tests asserted).

llvm-svn: 43586
This commit is contained in:
Fariborz Jahanian 2007-10-31 23:08:24 +00:00
parent aa9a95ca4f
commit c3cda76362
1 changed files with 3 additions and 0 deletions

View File

@ -544,6 +544,9 @@ void RewriteTest::SynthesizeObjcInternalStruct(ObjcInterfaceDecl *CDecl,
std::string &Result) {
assert(CDecl && "Class missing in SynthesizeObjcInternalStruct");
assert(CDecl->getName() && "Name missing in SynthesizeObjcInternalStruct");
// Do not synthesize more than once.
if (ObjcSynthesizedStructs.count(CDecl))
return;
ObjcInterfaceDecl *RCDecl = CDecl->getSuperClass();
if (RCDecl && !ObjcSynthesizedStructs.count(RCDecl)) {
// Do it for the root