Replace compiler for loops for the hash-table types to simplify code usage

This commit is contained in:
gingerBill
2022-12-09 11:29:28 +00:00
parent ffe953b43d
commit 34a048f7da
18 changed files with 269 additions and 209 deletions

View File

@@ -828,8 +828,8 @@ bool type_ptr_set_exists(PtrSet<Type *> *s, Type *t) {
// TODO(bill, 2019-10-05): This is very slow and it's probably a lot
// faster to cache types correctly
for_array(i, s->entries) {
Type *f = s->entries[i].ptr;
for (auto const &entry : *s) {
Type *f = entry.ptr;
if (are_types_identical(t, f)) {
ptr_set_add(s, t);
return true;