[cfe-commits] r167511 - /cfe/trunk/lib/Rewrite/Frontend/RewriteModernObjC.cpp

Fariborz Jahanian fjahanian at apple.com
Tue Nov 6 16:43:05 PST 2012


Author: fjahanian
Date: Tue Nov  6 18:43:05 2012
New Revision: 167511

URL: http://llvm.org/viewvc/llvm-project?rev=167511&view=rev
Log:
modern ObjC translator. Insert line number for @synchronized statements.

Modified:
    cfe/trunk/lib/Rewrite/Frontend/RewriteModernObjC.cpp

Modified: cfe/trunk/lib/Rewrite/Frontend/RewriteModernObjC.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Rewrite/Frontend/RewriteModernObjC.cpp?rev=167511&r1=167510&r2=167511&view=diff
==============================================================================
--- cfe/trunk/lib/Rewrite/Frontend/RewriteModernObjC.cpp (original)
+++ cfe/trunk/lib/Rewrite/Frontend/RewriteModernObjC.cpp Tue Nov  6 18:43:05 2012
@@ -1855,7 +1855,9 @@
   assert((*startBuf == '@') && "bogus @synchronized location");
 
   std::string buf;
-  buf = "{ id _rethrow = 0; id _sync_obj = ";
+  SourceLocation SynchLoc = S->getAtSynchronizedLoc();
+  ConvertSourceLocationToLineDirective(SynchLoc, buf);
+  buf += "{ id _rethrow = 0; id _sync_obj = ";
   
   const char *lparenBuf = startBuf;
   while (*lparenBuf != '(') lparenBuf++;





More information about the cfe-commits mailing list