summaryrefslogtreecommitdiff
path: root/source/slang/slang-check.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/slang/slang-check.cpp')
-rw-r--r--source/slang/slang-check.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/source/slang/slang-check.cpp b/source/slang/slang-check.cpp
index bcc74a6d0..8c6cddbfe 100644
--- a/source/slang/slang-check.cpp
+++ b/source/slang/slang-check.cpp
@@ -210,4 +210,24 @@ namespace Slang
throw;
}
}
+
+ void removeLookupForName(TypeCheckingCache* cache, Name* name)
+ {
+ auto& lookupCache = cache->lookupCache;
+
+ List<LookupRequestKey> keys;
+
+ for (const auto& pairs : lookupCache)
+ {
+ const auto& key = pairs.Key;
+ if (key.name == name)
+ {
+ keys.add(key);
+ }
+ }
+ for (auto& key : keys)
+ {
+ lookupCache.Remove(key);
+ }
+ }
}