From 79ec0cfdb5f3461c763e0bf712cf42eb87fccb90 Mon Sep 17 00:00:00 2001 From: jsmall-nvidia Date: Tue, 10 Dec 2019 10:02:19 -0500 Subject: DownstreamCompiler abstraction (#1149) * CPPCompiler -> DownstreamCompiler * Added DownstreamCompileResult to start abstraction such that we don't need files. * * Split out slang-blob.cpp * Made CompileResult hold a DownstreamCompileResult - for access to binary or ISlangSharedLibrary * Keep temporary files in scope. * Add a hash to the hex dump stream. * Move all file tracking into DownstreamCompiler. --- source/core/slang-visual-studio-compiler-util.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'source/core/slang-visual-studio-compiler-util.h') diff --git a/source/core/slang-visual-studio-compiler-util.h b/source/core/slang-visual-studio-compiler-util.h index 1e2fbb318..3571f4b42 100644 --- a/source/core/slang-visual-studio-compiler-util.h +++ b/source/core/slang-visual-studio-compiler-util.h @@ -1,37 +1,37 @@ #ifndef SLANG_VISUAL_STUDIO_COMPILER_UTIL_H #define SLANG_VISUAL_STUDIO_COMPILER_UTIL_H -#include "slang-cpp-compiler.h" +#include "slang-downstream-compiler.h" namespace Slang { -struct VisualStudioCompilerUtil : public CPPCompilerBaseUtil +struct VisualStudioCompilerUtil : public DownstreamCompilerBaseUtil { /// Calculate Visual Studio family compilers cmdLine arguments from options static SlangResult calcArgs(const CompileOptions& options, CommandLine& cmdLine); /// Parse Visual Studio exeRes into CPPCompiler::Output - static SlangResult parseOutput(const ExecuteResult& exeRes, CPPCompiler::Output& outOutput); + static SlangResult parseOutput(const ExecuteResult& exeRes, DownstreamDiagnostics& outOutput); static SlangResult calcModuleFilePath(const CompileOptions& options, StringBuilder& outPath); static SlangResult calcCompileProducts(const CompileOptions& options, ProductFlags flags, List& outPaths); }; -class VisualStudioCPPCompiler : public CommandLineCPPCompiler +class VisualStudioDownstreamCompiler : public CommandLineDownstreamCompiler { public: - typedef CommandLineCPPCompiler Super; + typedef CommandLineDownstreamCompiler Super; typedef VisualStudioCompilerUtil Util; - // CommandLineCPPCompiler impl - just forwards to the Util + // CommandLineDownstreamCompiler impl - just forwards to the Util virtual SlangResult calcArgs(const CompileOptions& options, CommandLine& cmdLine) SLANG_OVERRIDE { return Util::calcArgs(options, cmdLine); } - virtual SlangResult parseOutput(const ExecuteResult& exeResult, Output& output) SLANG_OVERRIDE { return Util::parseOutput(exeResult, output); } + virtual SlangResult parseOutput(const ExecuteResult& exeResult, DownstreamDiagnostics& output) SLANG_OVERRIDE { return Util::parseOutput(exeResult, output); } virtual SlangResult calcModuleFilePath(const CompileOptions& options, StringBuilder& outPath) SLANG_OVERRIDE { return Util::calcModuleFilePath(options, outPath); } virtual SlangResult calcCompileProducts(const CompileOptions& options, ProductFlags productFlags, List& outPaths) SLANG_OVERRIDE { return Util::calcCompileProducts(options, productFlags, outPaths); } - VisualStudioCPPCompiler(const Desc& desc):Super(desc) {} + VisualStudioDownstreamCompiler(const Desc& desc):Super(desc) {} }; -- cgit v1.2.3