From 64ddefb90cf440df7879d1f2f9cc61de71e0f181 Mon Sep 17 00:00:00 2001 From: Tim Foley Date: Fri, 13 Oct 2017 18:14:42 -0700 Subject: Move reflection JSON generation into separate text fixture (#211) Move reflection JSON generation into separate test fixture --- source/slang/compiler.cpp | 40 ++-------------------------------------- 1 file changed, 2 insertions(+), 38 deletions(-) (limited to 'source/slang/compiler.cpp') diff --git a/source/slang/compiler.cpp b/source/slang/compiler.cpp index d7de5c42e..d57c9b6cf 100644 --- a/source/slang/compiler.cpp +++ b/source/slang/compiler.cpp @@ -815,50 +815,14 @@ namespace Slang translationUnit->result = translationUnitResult; } - - // Allow for an "extra" target to verride things before we finish. - String extraResult; - switch (compileRequest->extraTarget) - { - case CodeGenTarget::ReflectionJSON: - { - String reflectionJSON = emitReflectionJSON(compileRequest->layout.Ptr()); - - // Clobber existing output so we don't have to deal with it - for( auto translationUnit : compileRequest->translationUnits ) - { - translationUnit->result = CompileResult(); - } - for( auto entryPoint : compileRequest->entryPoints ) - { - entryPoint->result = CompileResult(); - } - - extraResult = reflectionJSON; - } - break; - - default: - break; - } - // If we are in command-line mode, we might be expected to actually // write output to one or more files here. if (compileRequest->isCommandLineCompile) { - switch (compileRequest->extraTarget) + for( auto entryPoint : compileRequest->entryPoints ) { - case CodeGenTarget::ReflectionJSON: - fprintf(stdout, "%s", extraResult.begin()); - break; - - default: - for( auto entryPoint : compileRequest->entryPoints ) - { - writeEntryPointResult(entryPoint); - } - break; + writeEntryPointResult(entryPoint); } } -- cgit v1.2.3