update readme and fix unused function issue (#821)

This commit is contained in:
water111
2021-09-03 19:19:51 -04:00
committed by GitHub
parent 3d7010b05d
commit a96eb800c4
7 changed files with 108 additions and 39 deletions
+8 -1
View File
@@ -639,7 +639,14 @@ void ObjectFileDB::ir2_insert_lets(int seg) {
for_each_function_in_seg(seg, [&](Function& func, ObjectFileData&) {
if (func.ir2.expressions_succeeded) {
attempted++;
combined_stats += insert_lets(func, func.ir2.env, *func.ir2.form_pool, func.ir2.top_form);
try {
combined_stats += insert_lets(func, func.ir2.env, *func.ir2.form_pool, func.ir2.top_form);
} catch (const std::exception& e) {
func.warnings.general_warning(
fmt::format("Error while inserting lets: {}\n Make sure that the return type is not "
"none if something is actually returned.",
e.what()));
}
}
});