diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2007-10-31 22:57:04 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2007-10-31 22:57:04 +0000 |
commit | aff56d0bffdad7ed75db938d5e61e1ce3d5cd195 (patch) | |
tree | c74aafe681d1cb68545ffecda533d69fbb314a56 /Driver/RewriteTest.cpp | |
parent | fee0452973f28691a61aab0fb074468ce3e34b9b (diff) |
Changed direction of assert. Added more comments.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43585 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'Driver/RewriteTest.cpp')
-rw-r--r-- | Driver/RewriteTest.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/Driver/RewriteTest.cpp b/Driver/RewriteTest.cpp index 55fb4d7565..4e01dedcb5 100644 --- a/Driver/RewriteTest.cpp +++ b/Driver/RewriteTest.cpp @@ -271,7 +271,7 @@ void RewriteTest::RewriteForwardClassDecl(ObjcClassDecl *ClassDecl) { // Mark this typedef as having been generated. if (!ObjcForwardDecls.insert(ForwardDecl)) - assert(true && "typedef already output"); + assert(false && "typedef already output"); } // Replace the @class with typedefs corresponding to the classes. @@ -551,6 +551,9 @@ void RewriteTest::SynthesizeObjcInternalStruct(ObjcInterfaceDecl *CDecl, } int NumIvars = CDecl->getIntfDeclNumIvars(); + // If no ivars and no root or if its root, directly or indirectly, + // have no ivars (thus not synthesize) + // then no need to synthesize this class either. if (NumIvars <= 0 && (!RCDecl || !ObjcSynthesizedStructs.count(RCDecl))) return; @@ -602,7 +605,7 @@ void RewriteTest::SynthesizeObjcInternalStruct(ObjcInterfaceDecl *CDecl, Result += "};\n"; // Mark this struct as having been generated. if (!ObjcSynthesizedStructs.insert(CDecl)) - assert(true && "struct already synthesize- SynthesizeObjcInternalStruct"); + assert(false && "struct already synthesize- SynthesizeObjcInternalStruct"); } // RewriteObjcMethodsMetaData - Rewrite methods metadata for instance or |