diff options
author | Alon Zakai <azakai@google.com> | 2020-04-27 15:56:02 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-27 15:56:02 -0700 |
commit | 1e6435ac012a20025ae499d498f2b8901e01c326 (patch) | |
tree | 621c3168796c60e27967031c88330d23cf5b748f /src | |
parent | f53f88f5c9a9c80c253902f4301dbd4986c58510 (diff) | |
download | binaryen-1e6435ac012a20025ae499d498f2b8901e01c326.tar.gz binaryen-1e6435ac012a20025ae499d498f2b8901e01c326.tar.bz2 binaryen-1e6435ac012a20025ae499d498f2b8901e01c326.zip |
Emcc fuzzing followups (#2812)
Avoid pass-debug when fuzzing emcc, as it can be slow and isn't
what we care about.
Clean up a loop.
Diffstat (limited to 'src')
-rw-r--r-- | src/tools/wasm2c-wrapper.h | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/tools/wasm2c-wrapper.h b/src/tools/wasm2c-wrapper.h index aa36dd782..74ae21202 100644 --- a/src/tools/wasm2c-wrapper.h +++ b/src/tools/wasm2c-wrapper.h @@ -98,14 +98,13 @@ int main(int argc, char** argv) { // For each export in the wasm, emit code to call it and log its result, // similar to the other wrappers. - size_t exportIndex = 0; - - for (auto& exp : wasm.exports) { + for (size_t i = 0; i < wasm.exports.size(); i++) { + auto& exp = wasm.exports[i]; if (exp->kind != ExternalKind::Function) { continue; } - ret += " case " + std::to_string(exportIndex++) + ":\n"; + ret += " case " + std::to_string(i) + ":\n"; auto* func = wasm.getFunction(exp->value); |