diff options
| author | Tim Foley <tfoleyNV@users.noreply.github.com> | 2017-10-13 22:39:15 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-10-13 22:39:15 -0700 |
| commit | 3e3e2473bf85365593629bd1f6f070d11f0b8ab2 (patch) | |
| tree | 429dd72c135a43826a2aa29efe81b4de0915202b /source/slang/emit.cpp | |
| parent | 64ddefb90cf440df7879d1f2f9cc61de71e0f181 (diff) | |
Get rid of the `-slang-ir-asm` target (#212)
* Get rid of the `-slang-ir-asm` target
This is really only useful for debugging, so I've replaced the functionality with a `-dump-ir` command line option (which dump's the IR for an entry point before doing codegen).
* fixup: use HLSL target, not DXBC, so test can run on Linux
Diffstat (limited to 'source/slang/emit.cpp')
| -rw-r--r-- | source/slang/emit.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/source/slang/emit.cpp b/source/slang/emit.cpp index 7d7553bc5..8dcbcdbf4 100644 --- a/source/slang/emit.cpp +++ b/source/slang/emit.cpp @@ -1224,6 +1224,12 @@ struct EmitVisitor emitTypeImpl(arrayType->baseType, &arrayDeclarator); } + void visitGroupSharedType(GroupSharedType* type, TypeEmitArg const& arg) + { + Emit("groupshared "); + emitTypeImpl(type->valueType, arg.declarator); + } + void EmitType( RefPtr<Type> type, SourceLoc const& typeLoc, @@ -4492,6 +4498,9 @@ emitDeclImpl(decl, nullptr); if(!type) return; + if (type->Equals(getSession()->getVoidType())) + return; + emitIRType(context, type, getIRName(inst)); emit(" = "); } @@ -6266,7 +6275,10 @@ String emitEntryPoint( auto lowered = lowerEntryPointToIR(entryPoint, programLayout, target); // debugging: -// dumpIR(lowered); + if (translationUnit->compileRequest->shouldDumpIR) + { + dumpIR(lowered); + } // TODO: depending on the target we are trying to generate code for, // we may need to apply certain transformations, and we may also |
