From 15b46afc2d0c10561bb8440b2eec565a5edfad32 Mon Sep 17 00:00:00 2001 From: jsmall-nvidia Date: Mon, 16 Dec 2019 11:19:37 -0500 Subject: If a locator is not set for a DownstreamCompiler type, that doesn't *necessarily* mean that there isn't one, for example with the GENERIC_C_CPP option. This could also be fixed by say giving this type an empty locator, or special casing. The option chosen here, is to allow lookup even if there isn't a locator. Note that there is some special case handling, where a generic lookup, will prime all of the specific types. (#1154) --- source/slang/slang-check.cpp | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'source') diff --git a/source/slang/slang-check.cpp b/source/slang/slang-check.cpp index b04b1c9f1..bd7e2ea12 100644 --- a/source/slang/slang-check.cpp +++ b/source/slang/slang-check.cpp @@ -126,17 +126,15 @@ namespace Slang // Do we have a locator auto locator = m_downstreamCompilerLocators[int(type)]; - if (!locator) + if (locator) { - return nullptr; - } + m_downstreamCompilerSet->remove(SlangPassThrough(type)); - m_downstreamCompilerSet->remove(SlangPassThrough(type)); + SinkSharedLibraryLoader loader(m_sharedLibraryLoader, sink); + locator(m_downstreamCompilerPaths[int(type)], &loader, m_downstreamCompilerSet); - SinkSharedLibraryLoader loader(m_sharedLibraryLoader, sink); - locator(m_downstreamCompilerPaths[int(type)], &loader, m_downstreamCompilerSet); - - DownstreamCompilerUtil::updateDefaults(m_downstreamCompilerSet); + DownstreamCompilerUtil::updateDefaults(m_downstreamCompilerSet); + } DownstreamCompiler* compiler = nullptr; -- cgit v1.2.3