diff options
| author | Yong He <yonghe@outlook.com> | 2022-07-25 10:08:28 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-07-25 10:08:28 -0700 |
| commit | 9566e8af25f87ad034a984db9d847942e454a180 (patch) | |
| tree | 2f295bf2bf60c39fd35b6b634b903d574b4ca99e /source/slang/slang-ir-specialize-dynamic-associatedtype-lookup.cpp | |
| parent | 70147fc7ba6abe0b669363ed5adfd8d4d9545c3f (diff) | |
Allow `class` to implement COM interface, [DLLExport] (#2338)
* Allow `class` to implement COM interface, [DLLExport]
* Fix [COM] usage in tests and examples with UUIDs.
Co-authored-by: Yong He <yhe@nvidia.com>
Diffstat (limited to 'source/slang/slang-ir-specialize-dynamic-associatedtype-lookup.cpp')
| -rw-r--r-- | source/slang/slang-ir-specialize-dynamic-associatedtype-lookup.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/source/slang/slang-ir-specialize-dynamic-associatedtype-lookup.cpp b/source/slang/slang-ir-specialize-dynamic-associatedtype-lookup.cpp index 7464a1c35..52c8edca6 100644 --- a/source/slang/slang-ir-specialize-dynamic-associatedtype-lookup.cpp +++ b/source/slang/slang-ir-specialize-dynamic-associatedtype-lookup.cpp @@ -208,9 +208,12 @@ struct AssociatedTypeLookupSpecializationContext auto seqId = inst->findDecoration<IRSequentialIDDecoration>(); SLANG_ASSERT(seqId); // Insert code to pack sequential ID into an uint2 at all use sites. - for (auto use = inst->firstUse; use; ) + IRUse* nextUse = nullptr; + for (auto use = inst->firstUse; use; use = nextUse) { - auto nextUse = use->nextUse; + nextUse = use->nextUse; + if (as<IRCOMWitnessDecoration>(use->getUser())) + continue; IRBuilder builder(sharedContext->sharedBuilderStorage); builder.setInsertBefore(use->getUser()); auto uint2Type = builder.getVectorType( @@ -222,7 +225,6 @@ struct AssociatedTypeLookupSpecializationContext use->set(uint2seqID); use = nextUse; } - inst->replaceUsesWith(seqId->getSequentialIDOperand()); } }); |
