diff options
Diffstat (limited to 'source/slang/ir.h')
| -rw-r--r-- | source/slang/ir.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/source/slang/ir.h b/source/slang/ir.h index 09013fe48..d4497ec91 100644 --- a/source/slang/ir.h +++ b/source/slang/ir.h @@ -25,6 +25,7 @@ class Layout; class Type; class Session; class Name; +struct IRBuilder; struct IRFunc; struct IRGlobalValueWithCode; struct IRInst; @@ -934,6 +935,13 @@ SIMPLE_IR_TYPE(OutType, OutTypeBase) SIMPLE_IR_TYPE(InOutType, OutTypeBase) SIMPLE_IR_TYPE(ExistentialBoxType, PtrTypeBase) + /// Get the type pointed to be `ptrType`, or `nullptr` if it is not a pointer(-like) type. + /// + /// The given IR `builder` will be used if new instructions need to be created. +IRType* tryGetPointedToType( + IRBuilder* builder, + IRType* type); + struct IRFuncType : IRType { IRType* getResultType() { return (IRType*) getOperand(0); } |
