diff options
| author | kaizhangNV <149626564+kaizhangNV@users.noreply.github.com> | 2024-06-03 14:04:33 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-06-03 14:04:33 -0700 |
| commit | 68bf31e586b9d1805c19dd42492086c7c780c2a4 (patch) | |
| tree | e8cfb49e9240dca211e12741d6541b1218a9c045 /source/slang/slang-lower-to-ir.cpp | |
| parent | 753a524be885cf463fa6e60734aa739fcce1396f (diff) | |
Add an option to disable source map in obfuscation (#4260)
Add option "-disable-source-map" to disable the source map in obfuscation.
Diffstat (limited to 'source/slang/slang-lower-to-ir.cpp')
| -rw-r--r-- | source/slang/slang-lower-to-ir.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/source/slang/slang-lower-to-ir.cpp b/source/slang/slang-lower-to-ir.cpp index 403e2a921..5c4196839 100644 --- a/source/slang/slang-lower-to-ir.cpp +++ b/source/slang/slang-lower-to-ir.cpp @@ -10984,13 +10984,13 @@ RefPtr<IRModule> generateIRForTranslationUnit( // eliminateDeadCode(module, dceOptions); + if (stripOptions.shouldStripNameHints && linkage->m_optionSet.shouldHaveSourceMap()) + { + // The obfuscated source map is stored on the module + obfuscateModuleLocs(module, compileRequest->getSourceManager()); + } } - if (linkage->m_optionSet.shouldObfuscateCode()) - { - // The obfuscated source map is stored on the module - obfuscateModuleLocs(module, compileRequest->getSourceManager()); - } // TODO: consider doing some more aggressive optimizations // (in particular specialization of generics) here, so |
