summaryrefslogtreecommitdiffstats
path: root/source/slang/slang-emit-c-like.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/slang/slang-emit-c-like.cpp')
-rw-r--r--source/slang/slang-emit-c-like.cpp13
1 files changed, 5 insertions, 8 deletions
diff --git a/source/slang/slang-emit-c-like.cpp b/source/slang/slang-emit-c-like.cpp
index 6c004c84c..3438fd3f4 100644
--- a/source/slang/slang-emit-c-like.cpp
+++ b/source/slang/slang-emit-c-like.cpp
@@ -237,18 +237,15 @@ List<IRWitnessTableEntry*> CLikeSourceEmitter::getSortedWitnessTableEntries(IRWi
for (UInt i = 0; i < interfaceType->getOperandCount(); i++)
{
auto reqKey = cast<IRStructKey>(interfaceType->getOperand(i));
- bool matchingEntryFound = false;
IRWitnessTableEntry* entry = nullptr;
if (witnessTableEntryDictionary.TryGetValue(reqKey, entry))
{
- if (entry->requirementKey.get() == reqKey)
- {
- matchingEntryFound = true;
- sortedWitnessTableEntries.add(entry);
- break;
- }
+ sortedWitnessTableEntries.add(entry);
+ }
+ else
+ {
+ SLANG_UNREACHABLE("interface requirement key not found in witness table.");
}
- SLANG_ASSERT(matchingEntryFound);
}
return sortedWitnessTableEntries;
}