diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2012-11-07 00:43:05 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2012-11-07 00:43:05 +0000 |
commit | 43f4f1e92bb07a04c30c9781be4d0bb5cc30acdd (patch) | |
tree | fd1b1e191231d9b619278482c6c2290ea6ef8a46 /lib/Rewrite/Frontend/RewriteModernObjC.cpp | |
parent | b68ec6b7ff4f8d7795b11cd361fec46725d57e4e (diff) |
modern ObjC translator. Insert line number for @synchronized statements.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167511 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Rewrite/Frontend/RewriteModernObjC.cpp')
-rw-r--r-- | lib/Rewrite/Frontend/RewriteModernObjC.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Rewrite/Frontend/RewriteModernObjC.cpp b/lib/Rewrite/Frontend/RewriteModernObjC.cpp index 2f2f005db9..a86da54721 100644 --- a/lib/Rewrite/Frontend/RewriteModernObjC.cpp +++ b/lib/Rewrite/Frontend/RewriteModernObjC.cpp @@ -1855,7 +1855,9 @@ Stmt *RewriteModernObjC::RewriteObjCSynchronizedStmt(ObjCAtSynchronizedStmt *S) 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++; |