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)
|
if (!B)
|
||||||
B = Succ;
|
B = Succ;
|
||||||
|
|
||||||
if (B) {
|
assert(B);
|
||||||
|
|
||||||
// Finalize the last constructed block. This usually involves reversing the
|
// Finalize the last constructed block. This usually involves reversing the
|
||||||
// order of the statements in the block.
|
// 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
|
// Backpatch the gotos whose label -> block mappings we didn't know when we
|
||||||
// encountered them.
|
// encountered them.
|
||||||
|
@ -301,7 +302,6 @@ CFG* CFGBuilder::buildCFG(const Decl *D, Stmt* Statement, ASTContext* C,
|
||||||
}
|
}
|
||||||
|
|
||||||
Succ = B;
|
Succ = B;
|
||||||
}
|
|
||||||
|
|
||||||
// Create an empty entry block that has no predecessors.
|
// Create an empty entry block that has no predecessors.
|
||||||
cfg->setEntry(createBlock());
|
cfg->setEntry(createBlock());
|
||||||
|
|
Loading…
Reference in New Issue