block. This makes it a little easier for diagnostics generation.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71037
91177308-0d34-0410-b5e6-
96231b3b80d8
// FIXME: Add locking 'primitives' to CFG for @synchronized.
// Inline the body.
- Visit(S->getSynchBody());
+ CFGBlock *SyncBlock = Visit(S->getSynchBody());
+
+ // The sync body starts its own basic block. This makes it a little easier
+ // for diagnostic clients.
+ if (SyncBlock) {
+ if (!FinishBlock(SyncBlock))
+ return 0;
+
+ Block = 0;
+ }
+
+ Succ = SyncBlock;
// Inline the sync expression.
return Visit(S->getSynchExpr());