forked from OSchip/llvm-project
objective-c translator: fixes an obscure rewriting bug
which attempted to rewrite the same meta-data twice. llvm-svn: 150618
This commit is contained in:
parent
13f09b4191
commit
ff51338772
|
@ -1202,10 +1202,9 @@ void RewriteModernObjC::RewriteInterfaceDecl(ObjCInterfaceDecl *ClassDecl) {
|
|||
ResultStr += "typedef struct objc_object ";
|
||||
ResultStr += ClassDecl->getNameAsString();
|
||||
ResultStr += ";\n#endif\n";
|
||||
RewriteObjCInternalStruct(ClassDecl, ResultStr);
|
||||
// Mark this typedef as having been generated.
|
||||
ObjCForwardDecls.insert(ClassDecl->getCanonicalDecl());
|
||||
}
|
||||
RewriteObjCInternalStruct(ClassDecl, ResultStr);
|
||||
|
||||
for (ObjCInterfaceDecl::prop_iterator I = ClassDecl->prop_begin(),
|
||||
E = ClassDecl->prop_end(); I != E; ++I)
|
||||
|
@ -1222,6 +1221,7 @@ void RewriteModernObjC::RewriteInterfaceDecl(ObjCInterfaceDecl *ClassDecl) {
|
|||
// Lastly, comment out the @end.
|
||||
ReplaceText(ClassDecl->getAtEndRange().getBegin(), strlen("@end"),
|
||||
"/* @end */");
|
||||
}
|
||||
}
|
||||
|
||||
Stmt *RewriteModernObjC::RewritePropertyOrImplicitSetter(PseudoObjectExpr *PseudoOp) {
|
||||
|
|
Loading…
Reference in New Issue