forked from OSchip/llvm-project
source-level CFG: have the body for the @synchronized start with its own basic
block. This makes it a little easier for diagnostics generation. llvm-svn: 71037
This commit is contained in:
parent
e58fc20f8d
commit
b3c657bbd4
|
@ -937,7 +937,18 @@ CFGBlock* CFGBuilder::VisitObjCAtSynchronizedStmt(ObjCAtSynchronizedStmt* S) {
|
|||
// 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());
|
||||
|
|
Loading…
Reference in New Issue