-Add several ObjC types to Decl::getDeclKindName(), a useful debug hook.
-Start adding support for rewriting @synthesize.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60368 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/Driver/RewriteObjC.cpp b/Driver/RewriteObjC.cpp
index 1c20ef1..6979736 100644
--- a/Driver/RewriteObjC.cpp
+++ b/Driver/RewriteObjC.cpp
@@ -169,6 +169,7 @@
     void RewriteInclude();
     void RewriteTabs();
     void RewriteForwardClassDecl(ObjCClassDecl *Dcl);
+    void RewritePropertyImplDecl(ObjCPropertyImplDecl *PID);
     void RewriteInterfaceDecl(ObjCInterfaceDecl *Dcl);
     void RewriteImplementationDecl(NamedDecl *Dcl);
     void RewriteObjCMethodDecl(ObjCMethodDecl *MDecl, std::string &ResultStr);
@@ -585,6 +586,10 @@
   }
 }
 
+void RewriteObjC::RewritePropertyImplDecl(ObjCPropertyImplDecl *PID) {
+  SourceLocation startLoc = PID->getLocStart();
+  InsertText(startLoc, "// ", 3);
+}
 
 void RewriteObjC::RewriteForwardClassDecl(ObjCClassDecl *ClassDecl) {
   int numDecls = ClassDecl->getNumForwardDecls();
@@ -864,6 +869,12 @@
     ReplaceText(LocStart, endBuf-startBuf,
                 ResultStr.c_str(), ResultStr.size());    
   }
+  for (ObjCCategoryImplDecl::propimpl_iterator
+       I = IMD ? IMD->propimpl_begin() : CID->propimpl_begin(),
+       E = IMD ? IMD->propimpl_end() : CID->propimpl_end(); I != E; ++I) {
+    RewritePropertyImplDecl(*I);
+  }
+
   if (IMD)
     InsertText(IMD->getLocEnd(), "// ", 3);
   else