diff options
| author | Yong He <yonghe@outlook.com> | 2022-09-15 14:22:59 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-09-15 14:22:59 -0700 |
| commit | a6032446c6bf7f64d1e201bf438a4c7605a3dbb4 (patch) | |
| tree | a95267c52155e13699ff9aab38ab68353d76939e /source/slang/slang-ir-lower-bit-cast.cpp | |
| parent | 05f9aaf6a4ef246dcf89b00000a8e59e90c47662 (diff) | |
Language feature: pointer sized int types. (#2401)
* Language feature: pointer sized int types.
* Fix.
* small change to test.
* Fix stdlib.
* Fix.
* Fix.
* Add typedef for `size_t` in stdlib.
* Fix test.
* Add `intptr_t::size` constant.
Co-authored-by: Yong He <yhe@nvidia.com>
Diffstat (limited to 'source/slang/slang-ir-lower-bit-cast.cpp')
| -rw-r--r-- | source/slang/slang-ir-lower-bit-cast.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/source/slang/slang-ir-lower-bit-cast.cpp b/source/slang/slang-ir-lower-bit-cast.cpp index d895f1e28..e7a4b661b 100644 --- a/source/slang/slang-ir-lower-bit-cast.cpp +++ b/source/slang/slang-ir-lower-bit-cast.cpp @@ -168,6 +168,10 @@ struct BitCastLoweringContext case kIROp_UIntType: case kIROp_FloatType: case kIROp_BoolType: +#if SLANG_PTR_IS_32 + case kIROp_IntPtrType: + case kIROp_UIntPtrType: +#endif { auto object = extractValueAtOffset(builder, targetReq, src, offset, 4); return builder.emitBitCast(type, object); @@ -176,6 +180,10 @@ struct BitCastLoweringContext case kIROp_DoubleType: case kIROp_Int64Type: case kIROp_UInt64Type: +#if SLANG_PTR_IS_64 + case kIROp_IntPtrType: + case kIROp_UIntPtrType: +#endif case kIROp_RawPointerType: { auto low = extractValueAtOffset(builder, targetReq, src, offset, 4); |
