summaryrefslogtreecommitdiff
path: root/source/slang/slang-ir.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/slang/slang-ir.cpp')
-rw-r--r--source/slang/slang-ir.cpp30
1 files changed, 30 insertions, 0 deletions
diff --git a/source/slang/slang-ir.cpp b/source/slang/slang-ir.cpp
index b53c247c3..782f259ee 100644
--- a/source/slang/slang-ir.cpp
+++ b/source/slang/slang-ir.cpp
@@ -2890,6 +2890,36 @@ namespace Slang
return inst;
}
+ IRLiveRangeStart* IRBuilder::emitLiveRangeStart(IRInst* referenced)
+ {
+ // This instruction doesn't produce any result,
+ // so we make it's type void.
+ auto inst = createInst<IRLiveRangeStart>(
+ this,
+ kIROp_LiveRangeStart,
+ getVoidType(),
+ referenced);
+
+ addInst(inst);
+
+ return inst;
+ }
+
+ IRLiveRangeEnd* IRBuilder::emitLiveRangeEnd(IRInst* referenced)
+ {
+ // This instruction doesn't produce any result,
+ // so we make it's type void.
+ auto inst = createInst<IRLiveRangeEnd>(
+ this,
+ kIROp_LiveRangeEnd,
+ getVoidType(),
+ referenced);
+
+ addInst(inst);
+
+ return inst;
+ }
+
IRInst* IRBuilder::emitExtractExistentialValue(
IRType* type,
IRInst* existentialValue)