diff options
| author | Yong He <yonghe@outlook.com> | 2023-04-26 11:39:45 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-04-26 11:39:45 -0700 |
| commit | a1739e87b5fb90b0a39c583f8d2468f851869c9f (patch) | |
| tree | cfa00f7ac10ce16e25dc2ecfa414d0c714ff8b2a /source | |
| parent | 1717c6c507043a5cc960c2344dd556524804ce59 (diff) | |
Fix type legalization missing child upon recreate. (#2842)
* Fix type legliazation missing child upon recreate.
* Fix.
---------
Co-authored-by: Yong He <yhe@nvidia.com>
Diffstat (limited to 'source')
| -rw-r--r-- | source/slang/slang-ir-legalize-types.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/slang/slang-ir-legalize-types.cpp b/source/slang/slang-ir-legalize-types.cpp index 75e4bdacf..c07da3e56 100644 --- a/source/slang/slang-ir-legalize-types.cpp +++ b/source/slang/slang-ir-legalize-types.cpp @@ -2169,6 +2169,10 @@ static LegalVal legalizeInst( inst->replaceUsesWith(newInst); inst->removeFromParent(); context->replacedInstructions.add(inst); + for (auto child : inst->getDecorationsAndChildren()) + { + child->insertAtEnd(newInst); + } return LegalVal::simple(newInst); } return LegalVal::simple(inst); |
