diff options
Diffstat (limited to 'source/slang/slang-options.cpp')
| -rw-r--r-- | source/slang/slang-options.cpp | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/source/slang/slang-options.cpp b/source/slang/slang-options.cpp index a51ea01fe..7b4b02f68 100644 --- a/source/slang/slang-options.cpp +++ b/source/slang/slang-options.cpp @@ -2527,24 +2527,24 @@ SlangResult OptionsParser::_parse( // target that handles that format. Dictionary<CodeGenTarget, int> mapFormatToTargetIndex; - // If there was no explicit `-target` specified, then we will look - // at the `-o` options to see what we can infer. - // - if (m_rawTargets.getCount() == 0) - { - // If there are no targets and no outputs - if (m_rawOutputs.getCount() == 0) - { - m_requestImpl->m_emitIr = true; - } - else + // If there was no explicit `-target` specified, then we will look + // at the `-o` options to see what we can infer. + // + if (m_rawTargets.getCount() == 0) { - for (auto& rawOutput : m_rawOutputs) + // If there are no targets and no outputs + if (m_rawOutputs.getCount() == 0) { - // Some outputs don't imply a target format, and we shouldn't use those for inference. - auto impliedFormat = rawOutput.impliedFormat; - if (impliedFormat == CodeGenTarget::Unknown) - continue; + m_requestImpl->m_emitIr = true; + } + else + { + for (auto& rawOutput : m_rawOutputs) + { + // Some outputs don't imply a target format, and we shouldn't use those for inference. + auto impliedFormat = rawOutput.impliedFormat; + if (impliedFormat == CodeGenTarget::Unknown) + continue; int targetIndex = 0; if (!mapFormatToTargetIndex.tryGetValue(impliedFormat, targetIndex)) |
