summaryrefslogtreecommitdiffstats
path: root/source/slang/reflection.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/slang/reflection.cpp')
-rw-r--r--source/slang/reflection.cpp12
1 files changed, 1 insertions, 11 deletions
diff --git a/source/slang/reflection.cpp b/source/slang/reflection.cpp
index 59b50891c..c9de75d6e 100644
--- a/source/slang/reflection.cpp
+++ b/source/slang/reflection.cpp
@@ -437,18 +437,8 @@ SLANG_API SlangReflectionType * spReflection_FindTypeByName(SlangReflection * re
if (compileRequest->types.TryGetValue(name, result))
return (SlangReflectionType*)result.Ptr();
- Decl* resultDecl = nullptr;
auto nameObj = compileRequest->getNamePool()->getName(name);
- for (auto module : compileRequest->loadedModulesList)
- {
- if (module->moduleDecl->memberDictionary.TryGetValue(nameObj, resultDecl))
- break;
- }
- for (auto transUnit : compileRequest->translationUnits)
- {
- if (transUnit->SyntaxNode->memberDictionary.TryGetValue(nameObj, resultDecl))
- break;
- }
+ Decl* resultDecl = compileRequest->lookupGlobalDecl(nameObj);
if (resultDecl)
{
RefPtr<DeclRefType> declRefType = new DeclRefType();