diff options
| author | Yong He <yonghe@outlook.com> | 2022-08-22 14:17:56 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-08-22 14:17:56 -0700 |
| commit | 4bd3e6e02324f913e8927fe69d32c0aafe9fc831 (patch) | |
| tree | 1f6ff8449feb49d00dee2bc527f7dc531a07c196 /source/slang/slang-ir.cpp | |
| parent | 393185196ed65a9eeaf9502edbf3dcce87337d81 (diff) | |
Make Optional<PointerType> lower to PointerType instead of a struct. (#2373)
Diffstat (limited to 'source/slang/slang-ir.cpp')
| -rw-r--r-- | source/slang/slang-ir.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/source/slang/slang-ir.cpp b/source/slang/slang-ir.cpp index fd7cbe408..20bf6060d 100644 --- a/source/slang/slang-ir.cpp +++ b/source/slang/slang-ir.cpp @@ -4369,6 +4369,17 @@ namespace Slang return inst; } + IRInst* IRBuilder::emitCastPtrToBool(IRInst* val) + { + auto inst = createInst<IRInst>( + this, + kIROp_CastPtrToBool, + getBoolType(), + val); + addInst(inst); + return inst; + } + IRGlobalConstant* IRBuilder::emitGlobalConstant( IRType* type) { |
