diff options
Diffstat (limited to 'source/slang/slang-emit.cpp')
| -rw-r--r-- | source/slang/slang-emit.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/source/slang/slang-emit.cpp b/source/slang/slang-emit.cpp index 280822094..670848002 100644 --- a/source/slang/slang-emit.cpp +++ b/source/slang/slang-emit.cpp @@ -23,6 +23,8 @@ #include "slang-type-layout.h" #include "slang-visitor.h" +#include "slang-ir-strip.h" + #include "slang-emit-source-writer.h" #include "slang-emit-c-like.h" @@ -472,6 +474,15 @@ String emitEntryPoint( break; } + // If we have obfuscation strip + if (compileRequest->getLinkage()->m_obfuscateCode) + { + IRStripOptions options; + options.shouldStripNameHints = true; + options.stripSourceLocs = true; + stripFrontEndOnlyInstructions(irModule, options); + } + // The resource-based specialization pass above // may create specialized versions of functions, but // it does not try to completely eliminate the original |
