summaryrefslogtreecommitdiff
path: root/source/slang/ir.h
diff options
context:
space:
mode:
Diffstat (limited to 'source/slang/ir.h')
-rw-r--r--source/slang/ir.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/source/slang/ir.h b/source/slang/ir.h
index 2e15e39d6..12dc08e13 100644
--- a/source/slang/ir.h
+++ b/source/slang/ir.h
@@ -93,6 +93,8 @@ struct IRUse
IRUse** prevLink;
void init(IRUser* user, IRValue* usedValue);
+ void set(IRValue* usedValue);
+ void clear();
};
enum IRDecorationOp : uint16_t
@@ -255,6 +257,11 @@ struct IRUser : IRChildValue
{
return getArgs()[index].usedValue;
}
+
+ void setArg(UInt index, IRValue* value)
+ {
+ getArgs()[index].set(value);
+ }
};
// Instructions are values that are children of a basic block,