Skip to content

Commit

Permalink
[LazyCallGraph] Assert in removeDeadFunction() that NodeMap contains …
Browse files Browse the repository at this point in the history
…function

The function should always be known to LazyCallGraph
  • Loading branch information
aeubanks committed Jun 4, 2024
1 parent 2e0e163 commit eca9caf
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions llvm/lib/Analysis/LazyCallGraph.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1503,9 +1503,7 @@ void LazyCallGraph::removeDeadFunction(Function &F) {
"Must not remove lib functions from the call graph!");

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

Node &N = *NI->second;

Expand Down

0 comments on commit eca9caf

Please sign in to comment.