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.cpp15
1 files changed, 12 insertions, 3 deletions
diff --git a/source/slang/slang-ir.cpp b/source/slang/slang-ir.cpp
index c1cec36fe..a99eddebb 100644
--- a/source/slang/slang-ir.cpp
+++ b/source/slang/slang-ir.cpp
@@ -7769,6 +7769,12 @@ IntInfo getIntTypeInfo(const IRType* intType)
return {32, false};
case kIROp_UInt64Type:
return {64, false};
+ case kIROp_UIntPtrType:
+#if SLANG_PTR_IS_32
+ return {32, false};
+#else
+ return {64, false};
+#endif
case kIROp_Int8Type:
return {8, true};
case kIROp_Int16Type:
@@ -7777,9 +7783,12 @@ IntInfo getIntTypeInfo(const IRType* intType)
return {32, true};
case kIROp_Int64Type:
return {64, true};
-
- case kIROp_IntPtrType: // target platform dependent
- case kIROp_UIntPtrType: // target platform dependent
+ case kIROp_IntPtrType:
+#if SLANG_PTR_IS_32
+ return {32, true};
+#else
+ return {64, true};
+#endif
default:
SLANG_UNEXPECTED("Unhandled type passed to getIntTypeInfo");
}