diff options
Diffstat (limited to 'source/slang/slang-options.cpp')
| -rw-r--r-- | source/slang/slang-options.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/source/slang/slang-options.cpp b/source/slang/slang-options.cpp index f4cd2e4ef..00372ca3c 100644 --- a/source/slang/slang-options.cpp +++ b/source/slang/slang-options.cpp @@ -410,7 +410,7 @@ struct OptionsParser DiagnosticSink* requestSink = requestImpl->getSink(); - CommandLineContext* cmdLineContext = requestImpl->m_downstreamArgs.getContext(); + CommandLineContext* cmdLineContext = requestImpl->getLinkage()->m_downstreamArgs.getContext(); // Why create a new DiagnosticSink? // We *don't* want the lexer that comes as default (it's for Slang source!) @@ -437,9 +437,6 @@ struct OptionsParser parseSink.setFlag(DiagnosticSink::Flag::SourceLocationLine); } - // We don't know how big the terminal is.. let's guess 120 for now - parseSink.setSourceLineMaxLength(120); - // All diagnostics will also be sent to requestSink parseSink.setParentSink(requestSink); @@ -451,8 +448,11 @@ struct OptionsParser // Doing so will allocate some SourceLoc space from the CommandLineContext. args.setArgs(argv, argc); - // Before we do anything else lets strip out all of the downstream arguments. - SLANG_RETURN_ON_FAIL(requestImpl->m_downstreamArgs.stripDownstreamArgs(args, 0, sink)); + { + auto linkage = requestImpl->getLinkage(); + // Before we do anything else lets strip out all of the downstream arguments. + SLANG_RETURN_ON_FAIL(linkage->m_downstreamArgs.stripDownstreamArgs(args, 0, sink)); + } CommandLineReader reader(&args, sink); |
