summaryrefslogtreecommitdiffstats
path: root/source/slang/slang-ir-lower-generic-function.cpp
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2020-08-18 13:08:45 -0700
committerGitHub <noreply@github.com>2020-08-18 13:08:45 -0700
commitb820f34a1b6336af184458c5b1dfe2273c99f1ff (patch)
treeca9986891127cfe07eda18bfbdb5094eef5677cc /source/slang/slang-ir-lower-generic-function.cpp
parent9abcb6ea24dbc7184c3a2ad9f4458f63f8901928 (diff)
Support initializing an existential value from a generic value. (#1503)
* Support initializing an existential value from a generic value. * Remove trailing spaces and clean up debugging code.
Diffstat (limited to 'source/slang/slang-ir-lower-generic-function.cpp')
-rw-r--r--source/slang/slang-ir-lower-generic-function.cpp19
1 files changed, 7 insertions, 12 deletions
diff --git a/source/slang/slang-ir-lower-generic-function.cpp b/source/slang/slang-ir-lower-generic-function.cpp
index 360e3cdbb..f9a7e0a24 100644
--- a/source/slang/slang-ir-lower-generic-function.cpp
+++ b/source/slang/slang-ir-lower-generic-function.cpp
@@ -297,21 +297,16 @@ namespace Slang
while (sharedContext->workList.getCount() != 0)
{
- // We will then iterate until our work list goes dry.
- //
- while (sharedContext->workList.getCount() != 0)
- {
- IRInst* inst = sharedContext->workList.getLast();
+ IRInst* inst = sharedContext->workList.getLast();
- sharedContext->workList.removeLast();
- sharedContext->workListSet.Remove(inst);
+ sharedContext->workList.removeLast();
+ sharedContext->workListSet.Remove(inst);
- processInst(inst);
+ processInst(inst);
- for (auto child = inst->getLastChild(); child; child = child->getPrevInst())
- {
- sharedContext->addToWorkList(child);
- }
+ for (auto child = inst->getLastChild(); child; child = child->getPrevInst())
+ {
+ sharedContext->addToWorkList(child);
}
}