diff options
| author | Yong He <yonghe@outlook.com> | 2018-05-11 01:58:05 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-05-11 01:58:05 -0400 |
| commit | b0413c1a4f27ffdbf128048cc117a237b84d2747 (patch) | |
| tree | d8cd92fb4727955f01e945701998b4d480dca507 /source | |
| parent | 140e51e8f9f3b966372efef112f00aa931dd0ca5 (diff) | |
| parent | 4e07e22f5d6b62481108f620d28c24e480dfff7a (diff) | |
Merge pull request #558 from tfoleyNV/bad-type-emit-workaround
Workaround for cases where we emit illegal-but-unused types
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); } } |
