diff options
| author | Ellie Hermaszewska <ellieh@nvidia.com> | 2024-11-06 01:47:26 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-11-05 09:47:26 -0800 |
| commit | b118451e301d734e3e783b3acdf871f3f6ea851c (patch) | |
| tree | 277f160d31e2c442f724bc6a2d3c09fabff403ca /source/slang/slang-ir-propagate-func-properties.cpp | |
| parent | 53dd5928c35d5a5cb1f7d2a563348fd1fa87d672 (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-propagate-func-properties.cpp')
| -rw-r--r-- | source/slang/slang-ir-propagate-func-properties.cpp | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/source/slang/slang-ir-propagate-func-properties.cpp b/source/slang/slang-ir-propagate-func-properties.cpp index acc458b9d..8c13a6455 100644 --- a/source/slang/slang-ir-propagate-func-properties.cpp +++ b/source/slang/slang-ir-propagate-func-properties.cpp @@ -24,8 +24,10 @@ static bool isResourceLoad(IROp op) case kIROp_ByteAddressBufferLoad: case kIROp_StructuredBufferLoadStatus: case kIROp_RWStructuredBufferLoad: - case kIROp_RWStructuredBufferLoadStatus: return true; - default: return false; + case kIROp_RWStructuredBufferLoadStatus: + return true; + default: + return false; } } @@ -42,8 +44,10 @@ static bool isKnownOpCodeWithSideEffect(IROp op) case kIROp_Param: case kIROp_Unreachable: case kIROp_Store: - case kIROp_SwizzledStore: return true; - default: return false; + case kIROp_SwizzledStore: + return true; + default: + return false; } } @@ -57,7 +61,8 @@ public: { switch (decoration->getOp()) { - case kIROp_ReadNoneDecoration: return true; + case kIROp_ReadNoneDecoration: + return true; } } return false; @@ -70,7 +75,8 @@ public: switch (decoration->getOp()) { case kIROp_ReadNoneDecoration: - case kIROp_TargetIntrinsicDecoration: return false; + case kIROp_TargetIntrinsicDecoration: + return false; } } return true; @@ -258,7 +264,8 @@ public: { case kIROp_ReadNoneDecoration: case kIROp_NoSideEffectDecoration: - case kIROp_TargetIntrinsicDecoration: return false; + case kIROp_TargetIntrinsicDecoration: + return false; } } return true; @@ -271,7 +278,8 @@ public: switch (decoration->getOp()) { case kIROp_ReadNoneDecoration: - case kIROp_NoSideEffectDecoration: return true; + case kIROp_NoSideEffectDecoration: + return true; } } return false; |
