From 2e1c15f36b42374455228e37885bdb221f302050 Mon Sep 17 00:00:00 2001 From: Yong He Date: Wed, 2 Nov 2022 12:12:18 -0700 Subject: Rework differential conformance dictionary checking. (#2483) * Rework differential conformance dictionary checking. * Revert space changes. Co-authored-by: Yong He --- source/slang/slang-ir-util.cpp | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) (limited to 'source/slang/slang-ir-util.cpp') diff --git a/source/slang/slang-ir-util.cpp b/source/slang/slang-ir-util.cpp index 1f13eb754..214f10ef9 100644 --- a/source/slang/slang-ir-util.cpp +++ b/source/slang/slang-ir-util.cpp @@ -66,5 +66,38 @@ bool isComInterfaceType(IRType* type) return false; } +IROp getTypeStyle(IROp op) +{ + switch (op) + { + case kIROp_VoidType: + case kIROp_BoolType: + { + return op; + } + case kIROp_Int8Type: + case kIROp_Int16Type: + case kIROp_IntType: + case kIROp_UInt8Type: + case kIROp_UInt16Type: + case kIROp_UIntType: + case kIROp_Int64Type: + case kIROp_UInt64Type: + case kIROp_IntPtrType: + case kIROp_UIntPtrType: + { + // All int like + return kIROp_IntType; + } + case kIROp_HalfType: + case kIROp_FloatType: + case kIROp_DoubleType: + { + // All float like + return kIROp_FloatType; + } + default: return kIROp_Invalid; + } +} } -- cgit v1.2.3