forked from OSchip/llvm-project
Simplify code: Succ is guaranteed to be not NULL.
llvm-svn: 96772
This commit is contained in:
parent
740909be2d
commit
d39620c451
|
@ -264,10 +264,11 @@ CFG* CFGBuilder::buildCFG(const Decl *D, Stmt* Statement, ASTContext* C,
|
|||
if (!B)
|
||||
B = Succ;
|
||||
|
||||
if (B) {
|
||||
assert(B);
|
||||
|
||||
// Finalize the last constructed block. This usually involves reversing the
|
||||
// order of the statements in the block.
|
||||
if (Block) FinishBlock(B);
|
||||
FinishBlock(B);
|
||||
|
||||
// Backpatch the gotos whose label -> block mappings we didn't know when we
|
||||
// encountered them.
|
||||
|
@ -301,7 +302,6 @@ CFG* CFGBuilder::buildCFG(const Decl *D, Stmt* Statement, ASTContext* C,
|
|||
}
|
||||
|
||||
Succ = B;
|
||||
}
|
||||
|
||||
// Create an empty entry block that has no predecessors.
|
||||
cfg->setEntry(createBlock());
|
||||
|
|
Loading…
Reference in New Issue