summaryrefslogtreecommitdiffstats
path: root/source
diff options
context:
space:
mode:
Diffstat (limited to 'source')
-rw-r--r--source/slangc/main.cpp16
1 files changed, 5 insertions, 11 deletions
diff --git a/source/slangc/main.cpp b/source/slangc/main.cpp
index ae663e050..7b3aec476 100644
--- a/source/slangc/main.cpp
+++ b/source/slangc/main.cpp
@@ -30,20 +30,14 @@ static SlangResult _compile(SlangCompileRequest* compileRequest, int argc, const
spSetDiagnosticCallback(compileRequest, &_diagnosticCallback, nullptr);
spSetCommandLineCompilerMode(compileRequest);
- char const* appName = "slangc";
- if (argc > 0)
- appName = argv[0];
-
+ SlangResult res = spProcessCommandLineArguments(compileRequest, &argv[1], argc - 1);
+ if (SLANG_FAILED(res))
{
- const SlangResult res = spProcessCommandLineArguments(compileRequest, &argv[1], argc - 1);
- if (SLANG_FAILED(res))
- {
- // TODO: print usage message
- return res;
- }
+ // TODO: print usage message
+ return res;
}
- SlangResult res = SLANG_OK;
+ res = SLANG_OK;
#ifndef _DEBUG
try