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-simplify-cfg.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-simplify-cfg.cpp')
| -rw-r--r-- | source/slang/slang-ir-simplify-cfg.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/source/slang/slang-ir-simplify-cfg.cpp b/source/slang/slang-ir-simplify-cfg.cpp index a3131d1a7..90d30dcc7 100644 --- a/source/slang/slang-ir-simplify-cfg.cpp +++ b/source/slang/slang-ir-simplify-cfg.cpp @@ -56,7 +56,8 @@ static IRInst* findBreakableRegionHeaderInst(IRDominatorTree* domTree, IRBlock* switch (terminator->getOp()) { case kIROp_Switch: - case kIROp_loop: return terminator; + case kIROp_loop: + return terminator; } } return nullptr; @@ -145,7 +146,8 @@ static bool isTrivialSingleIterationLoop( if (isBlockInRegion(context.domTree, as<IRSwitch>(terminator), breakOriginBlock)) return false; break; - default: break; + default: + break; } } } @@ -576,7 +578,8 @@ static bool trySimplifySwitch(IRBuilder& builder, IRSwitch* switchInst) // If the target block is used by a special control flow inst, // it is likely a merge block and we can't fuse it. return; - default: break; + default: + break; } } targetUse->set(target); |
