From f65d756bff8d4c5cbc15bd0322a2ae8e6b896a21 Mon Sep 17 00:00:00 2001 From: Ellie Hermaszewska Date: Tue, 29 Oct 2024 14:49:26 +0800 Subject: format * format * Minor test fixes * enable checking cpp format in ci --- source/slang/slang-ir-string-hash.cpp | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'source/slang/slang-ir-string-hash.cpp') diff --git a/source/slang/slang-ir-string-hash.cpp b/source/slang/slang-ir-string-hash.cpp index 8074bd149..e5dd77a2c 100644 --- a/source/slang/slang-ir-string-hash.cpp +++ b/source/slang/slang-ir-string-hash.cpp @@ -1,10 +1,11 @@ // slang-ir-string-hash.cpp #include "slang-ir-string-hash.h" -#include "slang-ir.h" #include "slang-ir-insts.h" +#include "slang-ir.h" -namespace Slang { +namespace Slang +{ static void _findGetStringHashRec(IRInst* inst, List& outInsts) { @@ -27,9 +28,10 @@ void findGlobalHashedStringLiterals(IRModule* module, StringSlicePool& pool) { IRModuleInst* moduleInst = module->getModuleInst(); - for(IRInst* child : moduleInst->getChildren()) + for (IRInst* child : moduleInst->getChildren()) { - if (IRGlobalHashedStringLiterals* hashedStringLits = as(child)) + if (IRGlobalHashedStringLiterals* hashedStringLits = + as(child)) { const Index count = hashedStringLits->getOperandCount(); for (Index i = 0; i < count; ++i) @@ -50,7 +52,7 @@ void addGlobalHashedStringLiterals(const StringSlicePool& pool, IRModule* module } IRBuilder builder(module); - + // We need to add a global instruction that references all of these string literals builder.setInsertInto(module->getModuleInst()); @@ -92,8 +94,8 @@ Result checkGetStringHashInsts(IRModule* module, DiagnosticSink* sink) return SLANG_FAIL; } } - + return SLANG_OK; } -} +} // namespace Slang -- cgit v1.2.3