From b0ea5ed4da709312910898fa03b4dafc7a27e358 Mon Sep 17 00:00:00 2001 From: jsmall-nvidia Date: Fri, 1 Jul 2022 14:02:28 -0400 Subject: Fix for issue with redirecting stdout/err to a file (#2311) --- source/slang/slang.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'source/slang/slang.cpp') diff --git a/source/slang/slang.cpp b/source/slang/slang.cpp index 13ef0cd81..f2e6c5497 100644 --- a/source/slang/slang.cpp +++ b/source/slang/slang.cpp @@ -1440,8 +1440,14 @@ void TranslationUnitRequest::addSourceFile(SourceFile* sourceFile) } } +EndToEndCompileRequest::~EndToEndCompileRequest() +{ + // Flush any writers associated with the request + m_writers->flushWriters(); -// + m_linkage.setNull(); + m_frontEndReq.setNull(); +} static ISlangWriter* _getDefaultWriter(WriterChannel chan) { @@ -1467,7 +1473,7 @@ void EndToEndCompileRequest::setWriter(WriterChannel chan, ISlangWriter* writer) // If the user passed in null, we will use the default writer on that channel m_writers->setWriter(SlangWriterChannel(chan), writer ? writer : _getDefaultWriter(chan)); - // For diagnostic output, if the user passes in nullptr, we set on mSink.writer as that enables buffering on DiagnosticSink + // For diagnostic output, if the user passes in nullptr, we set on m_sink.writer as that enables buffering on DiagnosticSink if (chan == WriterChannel::Diagnostic) { m_sink.writer = writer; -- cgit v1.2.3