diff options
| author | Yong He <yonghe@outlook.com> | 2025-06-04 13:07:11 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-06-04 13:07:11 -0700 |
| commit | 2d7106640addf0ac88e0a5462117cd90b13a5e73 (patch) | |
| tree | 6ce27db4d6c5bf06db84dee755a82e09b1b3a2ca /source/slang/slang-emit.cpp | |
| parent | 812e478989e27983b8dea7ab11964de751654ba2 (diff) | |
Add legalization for 0-sized arrays. (#7327)
* Add legalization for 0-sized arrays.
* Allow 0-sized arrays in the front-end.
* More tests.
* Add `Conditional<T, hasValue>` type to core module.
* Update toc.
* Fix wording.
* Update test.
Diffstat (limited to 'source/slang/slang-emit.cpp')
| -rw-r--r-- | source/slang/slang-emit.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/source/slang/slang-emit.cpp b/source/slang/slang-emit.cpp index 20459c722..88533d938 100644 --- a/source/slang/slang-emit.cpp +++ b/source/slang/slang-emit.cpp @@ -56,6 +56,7 @@ #include "slang-ir-layout.h" #include "slang-ir-legalize-array-return-type.h" #include "slang-ir-legalize-binary-operator.h" +#include "slang-ir-legalize-empty-array.h" #include "slang-ir-legalize-global-values.h" #include "slang-ir-legalize-image-subscript.h" #include "slang-ir-legalize-mesh-outputs.h" @@ -1158,6 +1159,8 @@ Result linkAndOptimizeIR( addUserTypeHintDecorations(irModule); } + legalizeEmptyArray(irModule, sink); + // We don't need the legalize pass for C/C++ based types if (options.shouldLegalizeExistentialAndResourceTypes) { |
