diff --git a/src/tcompiler.cpp b/src/tcompiler.cpp index 2966cad7..1084845d 100644 --- a/src/tcompiler.cpp +++ b/src/tcompiler.cpp @@ -2028,6 +2028,9 @@ struct FunctionEmitter { cast(fstate->func->getEntryBlock().getTerminator()); Constant *r = dyn_cast(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; }