summaryrefslogtreecommitdiff
path: root/source/slang/slang-ir-any-value-marshalling.cpp
diff options
context:
space:
mode:
authorEllie Hermaszewska <ellieh@nvidia.com>2024-11-06 01:47:26 +0800
committerGitHub <noreply@github.com>2024-11-05 09:47:26 -0800
commitb118451e301d734e3e783b3acdf871f3f6ea851c (patch)
tree277f160d31e2c442f724bc6a2d3c09fabff403ca /source/slang/slang-ir-any-value-marshalling.cpp
parent53dd5928c35d5a5cb1f7d2a563348fd1fa87d672 (diff)
Move switch statement bodies to their own lines (#5493)
* Move switch statement bodies to their own lines * format --------- Co-authored-by: Yong He <yonghe@outlook.com>
Diffstat (limited to 'source/slang/slang-ir-any-value-marshalling.cpp')
-rw-r--r--source/slang/slang-ir-any-value-marshalling.cpp18
1 files changed, 12 insertions, 6 deletions
diff --git a/source/slang/slang-ir-any-value-marshalling.cpp b/source/slang/slang-ir-any-value-marshalling.cpp
index b51ab4608..163c5a808 100644
--- a/source/slang/slang-ir-any-value-marshalling.cpp
+++ b/source/slang/slang-ir-any-value-marshalling.cpp
@@ -354,7 +354,8 @@ struct AnyValueMarshallingContext
#endif
SLANG_UNIMPLEMENTED_X("AnyValue type packing for non 32-bit elements");
break;
- default: SLANG_UNREACHABLE("unknown basic type");
+ default:
+ SLANG_UNREACHABLE("unknown basic type");
}
}
@@ -546,7 +547,8 @@ struct AnyValueMarshallingContext
case kIROp_UInt8Type:
SLANG_UNIMPLEMENTED_X("AnyValue type packing for non 32-bit elements");
break;
- default: SLANG_UNREACHABLE("unknown basic type");
+ default:
+ SLANG_UNREACHABLE("unknown basic type");
}
}
@@ -728,15 +730,19 @@ SlangInt _getAnyValueSizeRaw(IRType* type, SlangInt offset)
case kIROp_IntType:
case kIROp_FloatType:
case kIROp_UIntType:
- case kIROp_BoolType: return alignUp(offset, 4) + 4;
+ case kIROp_BoolType:
+ return alignUp(offset, 4) + 4;
case kIROp_UInt64Type:
case kIROp_Int64Type:
- case kIROp_DoubleType: return -1;
+ case kIROp_DoubleType:
+ return -1;
case kIROp_Int16Type:
case kIROp_UInt16Type:
- case kIROp_HalfType: return alignUp(offset, 2) + 2;
+ case kIROp_HalfType:
+ return alignUp(offset, 2) + 2;
case kIROp_UInt8Type:
- case kIROp_Int8Type: return -1;
+ case kIROp_Int8Type:
+ return -1;
case kIROp_VectorType:
{
auto vectorType = static_cast<IRVectorType*>(type);