summaryrefslogtreecommitdiffstats
path: root/source/slang/compiler.cpp
diff options
context:
space:
mode:
authorTim Foley <tfoleyNV@users.noreply.github.com>2017-10-13 18:14:42 -0700
committerGitHub <noreply@github.com>2017-10-13 18:14:42 -0700
commit64ddefb90cf440df7879d1f2f9cc61de71e0f181 (patch)
tree03d113b2e58c9e232021df38350744226600f79c /source/slang/compiler.cpp
parent575230b93370fea86ecccb53fba73927280e917b (diff)
Move reflection JSON generation into separate text fixture (#211)
Move reflection JSON generation into separate test fixture
Diffstat (limited to 'source/slang/compiler.cpp')
-rw-r--r--source/slang/compiler.cpp40
1 files changed, 2 insertions, 38 deletions
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);
}
}