Skip to content

Commit eca9caf

Browse files
committed
[LazyCallGraph] Assert in removeDeadFunction() that NodeMap contains function
The function should always be known to LazyCallGraph
1 parent 2e0e163 commit eca9caf

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

llvm/lib/Analysis/LazyCallGraph.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1503,9 +1503,7 @@ void LazyCallGraph::removeDeadFunction(Function &F) {
15031503
"Must not remove lib functions from the call graph!");
15041504

15051505
auto NI = NodeMap.find(&F);
1506-
if (NI == NodeMap.end())
1507-
// Not in the graph at all!
1508-
return;
1506+
assert(NI != NodeMap.end() && "Removed function should be known!");
15091507

15101508
Node &N = *NI->second;
15111509

0 commit comments

Comments
 (0)