diff options
| author | jsmall-nvidia <jsmall@nvidia.com> | 2023-03-22 12:04:33 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-03-22 12:04:33 -0400 |
| commit | d4f99c8bac8b28f18c864a717d8833db6a1c872d (patch) | |
| tree | ebea06c019130d8248d5e4f6bccf5e4b2649e3cb /source/slang/slang.cpp | |
| parent | d8a40abba5223fbcb56c52b04ccb88c02bbaf79f (diff) | |
Source map obfuscation (#2717)
* #include an absolute path didn't work - because paths were taken to always be relative.
* WIP source map.
* Split out handling of RttiTypeFuncs to a map type.
* Make RttiTypeFuncsMap hold default impls.
* Slightly more sophisticated RttiTypeFuncsMap
* Source map decoding.
* Fix tabs.
* Fix asserts due to negative values.
* Use less obscure mechanisms in SourceMap.
* Source map decoding.
Simplifying SourceMap usage.
* First attempt at ouputting a source map as part of emit.
* Added support for -source-map option. SourceMap is added to the artifact.
* Small improvements around column calculation in SourceWriter.
* Source Loc obuscation WIP.
* Fix some issues around SourceMap obfuscation.
* Split out obfuscation into its own file.
* Keep obfuscated SourceMap even through serialization bottleneck.
Diffstat (limited to 'source/slang/slang.cpp')
| -rw-r--r-- | source/slang/slang.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/slang/slang.cpp b/source/slang/slang.cpp index 14b59d156..bd19670d9 100644 --- a/source/slang/slang.cpp +++ b/source/slang/slang.cpp @@ -2377,6 +2377,9 @@ void FrontEndCompileRequest::generateIR() if (useSerialIRBottleneck) { + // Keep the obfuscated source map (if there is one) + RefPtr<SourceMap> obfuscatedSourceMap = irModule->getObfuscatedSourceMap(); + IRSerialData serialData; { // Write IR out to serialData - copying over SourceLoc information directly @@ -2395,6 +2398,7 @@ void FrontEndCompileRequest::generateIR() // Set irModule to the read module irModule = irReadModule; + irModule->setObfuscatedSourceMap(obfuscatedSourceMap); } // Set the module on the translation unit |
