From dea234b50fac389605209e818bbab39777984f36 Mon Sep 17 00:00:00 2001 From: Thomas Lively Date: Fri, 3 Mar 2023 16:01:27 -0600 Subject: Fix type printing in the type fuzzer (#5543) In #5437 we updated type printing so that printing a heap type would print its name in addition to its contents. We had already been separately printing type names in the type fuzzer, so after that change we were printing each type name twice. Remove the redundant printing in the fuzzer to fix the error. --- src/tools/wasm-fuzz-types.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/tools/wasm-fuzz-types.cpp b/src/tools/wasm-fuzz-types.cpp index 4dfa1cf62..dd85223dc 100644 --- a/src/tools/wasm-fuzz-types.cpp +++ b/src/tools/wasm-fuzz-types.cpp @@ -116,18 +116,17 @@ void Fuzzer::printTypes(const std::vector& types) { if (inRecGroup()) { std::cout << ' '; } - std::cout << "(type $" << i << ' '; if (type.isBasic()) { - std::cout << print(type) << ")\n"; + std::cout << "(type $" << i << ' ' << print(type) << ")\n"; continue; } auto [it, inserted] = seen.insert({type, i}); if (inserted) { std::cout << print(type); } else { - std::cout << "identical to $" << it->second; + std::cout << "(type $" << i << " identical to $" << it->second << ")"; } - std::cout << ")\n"; + std::cout << "\n"; } if (inRecGroup()) { std::cout << ")\n"; -- cgit v1.2.3