summaryrefslogtreecommitdiffstats
path: root/source/slang/slang-options.cpp
diff options
context:
space:
mode:
authorEllie Hermaszewska <ellieh@nvidia.com>2024-11-06 01:47:26 +0800
committerGitHub <noreply@github.com>2024-11-05 09:47:26 -0800
commitb118451e301d734e3e783b3acdf871f3f6ea851c (patch)
tree277f160d31e2c442f724bc6a2d3c09fabff403ca /source/slang/slang-options.cpp
parent53dd5928c35d5a5cb1f7d2a563348fd1fa87d672 (diff)
Move switch statement bodies to their own lines (#5493)
* Move switch statement bodies to their own lines * format --------- Co-authored-by: Yong He <yonghe@outlook.com>
Diffstat (limited to 'source/slang/slang-options.cpp')
-rw-r--r--source/slang/slang-options.cpp52
1 files changed, 39 insertions, 13 deletions
diff --git a/source/slang/slang-options.cpp b/source/slang/slang-options.cpp
index bc83afe65..a4e7fb83c 100644
--- a/source/slang/slang-options.cpp
+++ b/source/slang/slang-options.cpp
@@ -2143,7 +2143,9 @@ SlangResult OptionsParser::_parse(int argc, char const* const* argv)
case OptionKind::NoHLSLPackConstantBufferElements:
case OptionKind::LoopInversion:
case OptionKind::UnscopedEnum:
- case OptionKind::PreserveParameters: linkage->m_optionSet.set(optionKind, true); break;
+ case OptionKind::PreserveParameters:
+ linkage->m_optionSet.set(optionKind, true);
+ break;
case OptionKind::MatrixLayoutRow:
case OptionKind::MatrixLayoutColumn:
linkage->m_optionSet.setMatrixLayoutMode(
@@ -2172,7 +2174,9 @@ SlangResult OptionsParser::_parse(int argc, char const* const* argv)
break;
}
- case OptionKind::CompileCoreModule: m_compileCoreModule = true; break;
+ case OptionKind::CompileCoreModule:
+ m_compileCoreModule = true;
+ break;
case OptionKind::ArchiveType:
{
SLANG_RETURN_ON_FAIL(_expectValue(m_archiveType));
@@ -2268,7 +2272,9 @@ SlangResult OptionsParser::_parse(int argc, char const* const* argv)
m_compileRequest->setDefaultModuleName(moduleName.value.getBuffer());
break;
}
- case OptionKind::LoadRepro: SLANG_RETURN_ON_FAIL(_parseLoadRepro(arg)); break;
+ case OptionKind::LoadRepro:
+ SLANG_RETURN_ON_FAIL(_parseLoadRepro(arg));
+ break;
case OptionKind::LoadReproDirectory:
{
CommandLineArg reproDirectory;
@@ -2312,12 +2318,18 @@ SlangResult OptionsParser::_parse(int argc, char const* const* argv)
}
break;
}
- case OptionKind::ReproFileSystem: SLANG_RETURN_ON_FAIL(_parseReproFileSystem(arg)); break;
- case OptionKind::SerialIr: m_frontEndReq->useSerialIRBottleneck = true; break;
+ case OptionKind::ReproFileSystem:
+ SLANG_RETURN_ON_FAIL(_parseReproFileSystem(arg));
+ break;
+ case OptionKind::SerialIr:
+ m_frontEndReq->useSerialIRBottleneck = true;
+ break;
case OptionKind::VerbosePaths:
m_requestImpl->getSink()->setFlag(DiagnosticSink::Flag::VerbosePath);
break;
- case OptionKind::DumpWarningDiagnostics: _dumpDiagnostics(Severity::Warning); break;
+ case OptionKind::DumpWarningDiagnostics:
+ _dumpDiagnostics(Severity::Warning);
+ break;
case OptionKind::WarningsAsErrors:
{
CommandLineArg operand;
@@ -2358,7 +2370,9 @@ SlangResult OptionsParser::_parse(int argc, char const* const* argv)
// Severity::Warning));
break;
}
- case OptionKind::VerifyDebugSerialIr: m_frontEndReq->verifyDebugSerialization = true; break;
+ case OptionKind::VerifyDebugSerialIr:
+ m_frontEndReq->verifyDebugSerialization = true;
+ break;
case OptionKind::IrCompression:
{
CommandLineArg name;
@@ -2443,7 +2457,9 @@ SlangResult OptionsParser::_parse(int argc, char const* const* argv)
(int)bindingSet);
break;
}
- case OptionKind::Profile: SLANG_RETURN_ON_FAIL(_parseProfile(arg)); break;
+ case OptionKind::Profile:
+ SLANG_RETURN_ON_FAIL(_parseProfile(arg));
+ break;
case OptionKind::Capability:
{
// The `-capability` option is similar to `-profile` but does not set the actual
@@ -2692,7 +2708,9 @@ SlangResult OptionsParser::_parse(int argc, char const* const* argv)
m_compileRequest->setOptimizationLevel(level);
break;
}
- case OptionKind::DebugInformation: SLANG_RETURN_ON_FAIL(_parseDebugInformation(arg)); break;
+ case OptionKind::DebugInformation:
+ SLANG_RETURN_ON_FAIL(_parseDebugInformation(arg));
+ break;
case OptionKind::FileSystem:
{
typedef TypeTextUtil::FileSystemType FileSystemType;
@@ -2701,7 +2719,9 @@ SlangResult OptionsParser::_parse(int argc, char const* const* argv)
switch (value)
{
- case FileSystemType::Default: m_compileRequest->setFileSystem(nullptr); break;
+ case FileSystemType::Default:
+ m_compileRequest->setFileSystem(nullptr);
+ break;
case FileSystemType::LoadFile:
m_compileRequest->setFileSystem(OSFileSystem::getLoadSingleton());
break;
@@ -2711,13 +2731,17 @@ SlangResult OptionsParser::_parse(int argc, char const* const* argv)
}
break;
}
- case OptionKind::ReferenceModule: SLANG_RETURN_ON_FAIL(_parseReferenceModule(arg)); break;
+ case OptionKind::ReferenceModule:
+ SLANG_RETURN_ON_FAIL(_parseReferenceModule(arg));
+ break;
case OptionKind::Version:
{
m_sink->diagnoseRaw(Severity::Note, m_session->getBuildTagString());
break;
}
- case OptionKind::HelpStyle: SLANG_RETURN_ON_FAIL(_expectValue(m_helpStyle)); break;
+ case OptionKind::HelpStyle:
+ SLANG_RETURN_ON_FAIL(_expectValue(m_helpStyle));
+ break;
case OptionKind::Help:
{
SLANG_RETURN_ON_FAIL(_parseHelp(arg));
@@ -3447,7 +3471,9 @@ SlangResult OptionsParser::_parse(int argc, char const* const* argv)
case CodeGenTarget::DXIL:
case CodeGenTarget::MetalLib:
case CodeGenTarget::MetalLibAssembly:
- case CodeGenTarget::Metal: rawOutput.isWholeProgram = true; break;
+ case CodeGenTarget::Metal:
+ rawOutput.isWholeProgram = true;
+ break;
case CodeGenTarget::SPIRV:
case CodeGenTarget::SPIRVAssembly:
if (getCurrentTarget()->optionSet.shouldEmitSPIRVDirectly())