diff options
| author | jsmall-nvidia <jsmall@nvidia.com> | 2022-05-27 17:28:05 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-05-27 17:28:05 -0400 |
| commit | 2d3392f22c894957d17dd13486e0565c4ecea89c (patch) | |
| tree | ce4dadbd85a59e52725fa6f92613553cd5b29859 /source/slang/slang-ir-link.cpp | |
| parent | abb89b3e460e11e8f9a134199c2d559190bfc47e (diff) | |
Added NativeStringType (#2252)
* #include an absolute path didn't work - because paths were taken to always be relative.
* Use TerminatedUnownedStringSlice for literals in output C++.
* Remove Escape/Unescape functions used in slang-token-reader.cpp
Add target type of 'host-cpp' etc to map to the target types.
* Fix some corner cases around string encoding.
* Added unit test for string escaping.
Fixed some assorted escaping bugs.
* Updated test output.
* Added decode test.
* Stop using hex output, to get around 'greedy' aspect. Use octal instead.
Diffstat (limited to 'source/slang/slang-ir-link.cpp')
| -rw-r--r-- | source/slang/slang-ir-link.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/source/slang/slang-ir-link.cpp b/source/slang/slang-ir-link.cpp index b67d95abf..7984c5037 100644 --- a/source/slang/slang-ir-link.cpp +++ b/source/slang/slang-ir-link.cpp @@ -1477,10 +1477,13 @@ LinkedIR linkIR( // need to operate on all the global parameters can do so. // IRVarLayout* irGlobalScopeVarLayout = nullptr; - if( auto irGlobalScopeLayoutDecoration = irModuleForLayout->getModuleInst()->findDecoration<IRLayoutDecoration>() ) + if (irModuleForLayout) { - auto irOriginalGlobalScopeVarLayout = irGlobalScopeLayoutDecoration->getLayout(); - irGlobalScopeVarLayout = cast<IRVarLayout>(cloneValue(context, irOriginalGlobalScopeVarLayout)); + if( auto irGlobalScopeLayoutDecoration = irModuleForLayout->getModuleInst()->findDecoration<IRLayoutDecoration>() ) + { + auto irOriginalGlobalScopeVarLayout = irGlobalScopeLayoutDecoration->getLayout(); + irGlobalScopeVarLayout = cast<IRVarLayout>(cloneValue(context, irOriginalGlobalScopeVarLayout)); + } } // Bindings for global generic parameters are currently represented |
