Skip to content

Commit

Permalink
Clear funcation analysis cache before erasing.
Browse files Browse the repository at this point in the history
  • Loading branch information
elliottslaughter committed Jun 22, 2024
1 parent 280d3aa commit f29cfd2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/tcompiler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2028,6 +2028,9 @@ struct FunctionEmitter {
cast<ReturnInst>(fstate->func->getEntryBlock().getTerminator());
Constant *r = dyn_cast<Constant>(term->getReturnValue());
assert(r || !"constant expression was not constant");
#if LLVM_VERSION >= 170
CU->fam.clear(*fstate->func, fstate->func->getName());
#endif
fstate->func->eraseFromParent();
return r;
}
Expand Down

0 comments on commit f29cfd2

Please sign in to comment.