diff --git a/src/passes/StringLowering.cpp b/src/passes/StringLowering.cpp index 090a3017f76..e1bae85200a 100644 --- a/src/passes/StringLowering.cpp +++ b/src/passes/StringLowering.cpp @@ -288,9 +288,11 @@ struct StringLowering : public StringGathering { // string.length: string -> i32 lengthImport = addImport(module, "length", nullExt, Type::i32); // string.codePointAt: string, offset -> i32 - codePointAtImport = addImport(module, "codePointAt", {nullExt, Type::i32}, Type::i32); + codePointAtImport = + addImport(module, "codePointAt", {nullExt, Type::i32}, Type::i32); // string.substring: string, start, end -> string - substringImport = addImport(module, "substring", {nullExt, Type::i32, Type::i32}, nnExt); + substringImport = + addImport(module, "substring", {nullExt, Type::i32, Type::i32}, nnExt); // Replace the string instructions in parallel. struct Replacer : public WalkerPass> { @@ -370,16 +372,17 @@ struct StringLowering : public StringGathering { void visitStringWTF16Get(StringWTF16Get* curr) { Builder builder(*getModule()); - replaceCurrent( - builder.makeCall(lowering.codePointAtImport, {curr->ref, curr->pos}, Type::i32)); + replaceCurrent(builder.makeCall( + lowering.codePointAtImport, {curr->ref, curr->pos}, Type::i32)); } void visitStringSliceWTF(StringSliceWTF* curr) { Builder builder(*getModule()); switch (curr->op) { case StringSliceWTF16: - replaceCurrent( - builder.makeCall(lowering.substringImport, {curr->ref, curr->start, curr->end}, lowering.nnExt)); + replaceCurrent(builder.makeCall(lowering.substringImport, + {curr->ref, curr->start, curr->end}, + lowering.nnExt)); return; default: WASM_UNREACHABLE("TODO: all string.slice*");