aboutsummaryrefslogtreecommitdiff
path: root/src/types.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/types.cpp')
-rw-r--r--src/types.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/types.cpp b/src/types.cpp
index 890098ad0..c113525d6 100644
--- a/src/types.cpp
+++ b/src/types.cpp
@@ -816,6 +816,14 @@ gb_internal bool type_ptr_set_update(PtrSet<Type *> *s, Type *t) {
if (ptr_set_exists(s, t)) {
return true;
}
+ ptr_set_add(s, t);
+ return false;
+}
+
+gb_internal bool type_ptr_set_exists(PtrSet<Type *> *s, Type *t) {
+ if (ptr_set_exists(s, t)) {
+ return true;
+ }
// TODO(bill, 2019-10-05): This is very slow and it's probably a lot
// faster to cache types correctly