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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43586 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Fariborz Jahanian 2007-10-31 23:08:24 +00:00
Родитель aff56d0bff
Коммит 212b768a4b
1 изменённых файлов: 3 добавлений и 0 удалений

Просмотреть файл

@ -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