summaryrefslogtreecommitdiff
path: root/source/slang/slang-ir-lower-error-handling.cpp
diff options
context:
space:
mode:
authorEllie Hermaszewska <ellieh@nvidia.com>2024-10-29 14:49:26 +0800
committerGitHub <noreply@github.com>2024-10-29 14:49:26 +0800
commitf65d756bff8d4c5cbc15bd0322a2ae8e6b896a21 (patch)
treeea1d61342cd29368e19135000ec2948813096205 /source/slang/slang-ir-lower-error-handling.cpp
parenta729c15e9dce9f5116a38afc66329ab2ca4cea54 (diff)
format
* format * Minor test fixes * enable checking cpp format in ci
Diffstat (limited to 'source/slang/slang-ir-lower-error-handling.cpp')
-rw-r--r--source/slang/slang-ir-lower-error-handling.cpp33
1 files changed, 11 insertions, 22 deletions
diff --git a/source/slang/slang-ir-lower-error-handling.cpp b/source/slang/slang-ir-lower-error-handling.cpp
index 6cfaf1926..e566e4a80 100644
--- a/source/slang/slang-ir-lower-error-handling.cpp
+++ b/source/slang/slang-ir-lower-error-handling.cpp
@@ -2,8 +2,8 @@
#include "slang-ir-lower-error-handling.h"
-#include "slang-ir.h"
#include "slang-ir-insts.h"
+#include "slang-ir.h"
namespace Slang
{
@@ -17,10 +17,9 @@ struct ErrorHandlingLoweringContext
InstHashSet workListSet;
ErrorHandlingLoweringContext(IRModule* inModule)
- : module(inModule)
- , workList(inModule)
- , workListSet(inModule)
- {}
+ : module(inModule), workList(inModule), workListSet(inModule)
+ {
+ }
void addToWorkList(IRInst* inst)
{
@@ -165,17 +164,10 @@ struct ErrorHandlingLoweringContext
{
switch (inst->getOp())
{
- case kIROp_TryCall:
- processTryCall(cast<IRTryCall>(inst));
- break;
- case kIROp_Return:
- processReturn(cast<IRReturn>(inst));
- break;
- case kIROp_Throw:
- processThrow(cast<IRThrow>(inst));
- break;
- default:
- break;
+ case kIROp_TryCall: processTryCall(cast<IRTryCall>(inst)); break;
+ case kIROp_Return: processReturn(cast<IRReturn>(inst)); break;
+ case kIROp_Throw: processThrow(cast<IRThrow>(inst)); break;
+ default: break;
}
}
@@ -212,11 +204,8 @@ struct ErrorHandlingLoweringContext
{
switch (child->getOp())
{
- case kIROp_FuncType:
- oldFuncTypes.add(cast<IRFuncType>(child));
- break;
- default:
- break;
+ case kIROp_FuncType: oldFuncTypes.add(cast<IRFuncType>(child)); break;
+ default: break;
}
}
for (auto funcType : oldFuncTypes)
@@ -232,4 +221,4 @@ void lowerErrorHandling(IRModule* module, DiagnosticSink* sink)
context.diagnosticSink = sink;
return context.processModule();
}
-}
+} // namespace Slang