diff options
| author | jsmall-nvidia <jsmall@nvidia.com> | 2019-12-16 11:19:37 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-12-16 11:19:37 -0500 |
| commit | 15b46afc2d0c10561bb8440b2eec565a5edfad32 (patch) | |
| tree | 51b601c083a7d9ea74f5d55de2142f0a52c4a44a /source | |
| parent | a2d4d447639a1860f9de4ba9e2435f1d40ff3669 (diff) | |
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)
Diffstat (limited to 'source')
| -rw-r--r-- | source/slang/slang-check.cpp | 14 |
1 files changed, 6 insertions, 8 deletions
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; |
