summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/LazyCallGraph.cpp
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2017-08-05 04:04:06 +0000
committerChandler Carruth <chandlerc@gmail.com>2017-08-05 04:04:06 +0000
commit39df40d8c2f89a084276b332b88b0633444db5ec (patch)
tree1dd343f1fb2422e10ba1ed8a1daa5e3c4b94ba3a /llvm/lib/Analysis/LazyCallGraph.cpp
parent403d3c4b2b68d510b3bbb84ba683e99c7ba2e8e6 (diff)
downloadbcm5719-llvm-39df40d8c2f89a084276b332b88b0633444db5ec.tar.gz
bcm5719-llvm-39df40d8c2f89a084276b332b88b0633444db5ec.zip
[LCG] Replace an implicit bool operator with a named function. (NFC)
The definition of 'false' here was already pretty vague and debatable, and I'm about to add another potential 'false' that would actually make much more sense in a bool operator. Especially given how rarely this is used, a nicely named method seems better. llvm-svn: 310165
Diffstat (limited to 'llvm/lib/Analysis/LazyCallGraph.cpp')
-rw-r--r--llvm/lib/Analysis/LazyCallGraph.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Analysis/LazyCallGraph.cpp b/llvm/lib/Analysis/LazyCallGraph.cpp
index 7d38dd945ab..46e29828990 100644
--- a/llvm/lib/Analysis/LazyCallGraph.cpp
+++ b/llvm/lib/Analysis/LazyCallGraph.cpp
@@ -212,7 +212,7 @@ void LazyCallGraph::SCC::verify() {
assert(N->LowLink == -1 &&
"Must set low link to -1 when adding a node to an SCC!");
for (Edge &E : **N)
- assert(E.getNode() && "Can't have an unpopulated node!");
+ assert(E.getNode().isPopulated() && "Can't have an unpopulated node!");
}
}
#endif
@@ -1649,7 +1649,7 @@ void LazyCallGraph::removeDeadFunction(Function &F) {
for (RefSCC &ParentRC : RC.parents())
for (SCC &ParentC : ParentRC)
for (Node &ParentN : ParentC)
- if (ParentN)
+ if (ParentN.isPopulated())
ParentN->removeEdgeInternal(N);
// Now remove this RefSCC from any parents sets and the leaf list.
OpenPOWER on IntegriCloud