aboutsummaryrefslogtreecommitdiff
path: root/lib/Analysis/CFG.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2009-10-20 23:59:28 +0000
committerTed Kremenek <kremenek@apple.com>2009-10-20 23:59:28 +0000
commitda9b30ea415af1de659524c28793e2597342f6e8 (patch)
treeee2435f0f5a0289a579e5ba7785517a509d10725 /lib/Analysis/CFG.cpp
parentcd6cdeb7d15af731d1d06d9aee4190713f59e8d7 (diff)
Remove stale comment and tighten code.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84697 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/CFG.cpp')
-rw-r--r--lib/Analysis/CFG.cpp7
1 files changed, 1 insertions, 6 deletions
diff --git a/lib/Analysis/CFG.cpp b/lib/Analysis/CFG.cpp
index 6945c2f376..31417597f7 100644
--- a/lib/Analysis/CFG.cpp
+++ b/lib/Analysis/CFG.cpp
@@ -254,12 +254,7 @@ CFG* CFGBuilder::buildCFG(Stmt* Statement, ASTContext* C) {
// Create an empty entry block that has no predecessors.
cfg->setEntry(createBlock());
- if (badCFG)
- return NULL;
-
- // NULL out cfg so that repeated calls to the builder will fail and that the
- // ownership of the constructed CFG is passed to the caller.
- return cfg.take();
+ return badCFG ? NULL : cfg.take();
}
/// createBlock - Used to lazily create blocks that are connected