summaryrefslogtreecommitdiff
path: root/source/slang/slang-ir-lower-result-type.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-lower-result-type.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-lower-result-type.cpp')
-rw-r--r--source/slang/slang-ir-lower-result-type.cpp33
1 files changed, 24 insertions, 9 deletions
diff --git a/source/slang/slang-ir-lower-result-type.cpp b/source/slang/slang-ir-lower-result-type.cpp
index 655d8041a..4cf684f33 100644
--- a/source/slang/slang-ir-lower-result-type.cpp
+++ b/source/slang/slang-ir-lower-result-type.cpp
@@ -111,8 +111,10 @@ struct ResultTypeLoweringContext
case kIROp_UInt16Type:
case kIROp_UIntType:
case kIROp_UInt64Type:
- case kIROp_UIntPtrType: break;
- default: SLANG_ASSERT_FAILURE("error type is not lowered to an integer type.");
+ case kIROp_UIntPtrType:
+ break;
+ default:
+ SLANG_ASSERT_FAILURE("error type is not lowered to an integer type.");
}
IRBuilder builderStorage(module);
auto builder = &builderStorage;
@@ -247,13 +249,26 @@ struct ResultTypeLoweringContext
{
switch (inst->getOp())
{
- case kIROp_MakeResultValue: processMakeResultValue((IRMakeResultValue*)inst); break;
- case kIROp_MakeResultError: processMakeResultError((IRMakeResultError*)inst); break;
- case kIROp_GetResultError: processGetResultError((IRGetResultError*)inst); break;
- case kIROp_GetResultValue: processGetResultValue((IRGetResultValue*)inst); break;
- case kIROp_IsResultError: processIsResultError((IRIsResultError*)inst); break;
- case kIROp_ResultType: processResultType((IRResultType*)inst); break;
- default: break;
+ case kIROp_MakeResultValue:
+ processMakeResultValue((IRMakeResultValue*)inst);
+ break;
+ case kIROp_MakeResultError:
+ processMakeResultError((IRMakeResultError*)inst);
+ break;
+ case kIROp_GetResultError:
+ processGetResultError((IRGetResultError*)inst);
+ break;
+ case kIROp_GetResultValue:
+ processGetResultValue((IRGetResultValue*)inst);
+ break;
+ case kIROp_IsResultError:
+ processIsResultError((IRIsResultError*)inst);
+ break;
+ case kIROp_ResultType:
+ processResultType((IRResultType*)inst);
+ break;
+ default:
+ break;
}
}