diff options
Diffstat (limited to 'source')
| -rw-r--r-- | source/slang/emit.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source/slang/emit.cpp b/source/slang/emit.cpp index 9874e3ef3..bf7fceb0e 100644 --- a/source/slang/emit.cpp +++ b/source/slang/emit.cpp @@ -5701,6 +5701,12 @@ struct EmitVisitor for(auto inst : module->getGlobalInsts()) { + if( as<IRType>(inst) ) + { + // Don't emit a type unless it is actually used. + continue; + } + ensureGlobalInst(&ctx, inst, EmitAction::Level::Definition); } } |
