summaryrefslogtreecommitdiff
path: root/source/slang/slang-ir.h
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2023-11-07 19:03:52 -0800
committerGitHub <noreply@github.com>2023-11-07 19:03:52 -0800
commit0f2578d7b3e75c0e5ef724ffe610d004fb116a03 (patch)
treed8bbe837a35377a64508b0c34c34feb6da43e02e /source/slang/slang-ir.h
parent421941993d169c943f2c364bfe9c48b603339fd1 (diff)
Add `IRThisTypeWitness` to stand in for witness lookups inside an interface definition. (#3316)
Co-authored-by: Yong He <yhe@nvidia.com>
Diffstat (limited to 'source/slang/slang-ir.h')
-rw-r--r--source/slang/slang-ir.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/source/slang/slang-ir.h b/source/slang/slang-ir.h
index cb744d4da..8d7cad0b4 100644
--- a/source/slang/slang-ir.h
+++ b/source/slang/slang-ir.h
@@ -1802,6 +1802,16 @@ struct IRThisType : IRType
}
};
+struct IRThisTypeWitness : IRInst
+{
+ IR_LEAF_ISA(ThisTypeWitness)
+
+ IRInst* getConstraintType()
+ {
+ return getOperand(0);
+ }
+};
+
struct IRInterfaceRequirementEntry : IRInst
{
IRInst* getRequirementKey() { return getOperand(0); }