diff options
author | Sam Clegg <sbc@chromium.org> | 2019-12-04 13:09:41 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-12-04 13:09:41 -0600 |
commit | 19d929cedb4dcf8b646dbbb58bfe59853b5d08e5 (patch) | |
tree | ea264ba70cba4f76af07ef0e2174cd6257c7abe9 /src/tools/wasm-opt.cpp | |
parent | f346478e1eb510d61c603eb6533d2c01f413e47a (diff) | |
download | binaryen-19d929cedb4dcf8b646dbbb58bfe59853b5d08e5.tar.gz binaryen-19d929cedb4dcf8b646dbbb58bfe59853b5d08e5.tar.bz2 binaryen-19d929cedb4dcf8b646dbbb58bfe59853b5d08e5.zip |
Convert to using DEBUG macros (#2497)
This means that debugging/tracing can now be enabled and controlled
centrally without managing and passing state around the codebase.
Diffstat (limited to 'src/tools/wasm-opt.cpp')
-rw-r--r-- | src/tools/wasm-opt.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/tools/wasm-opt.cpp b/src/tools/wasm-opt.cpp index 1964019a5..7b04f5449 100644 --- a/src/tools/wasm-opt.cpp +++ b/src/tools/wasm-opt.cpp @@ -210,7 +210,6 @@ int main(int argc, const char* argv[]) { if (!translateToFuzz) { ModuleReader reader; - reader.setDebug(options.debug); try { reader.read(options.extra["infile"], wasm, inputSourceMapFilename); } catch (ParseException& p) { @@ -285,7 +284,6 @@ int main(int argc, const char* argv[]) { if (extraFuzzCommand.size() > 0 && options.extra.count("output") > 0) { BYN_TRACE("writing binary before opts, for extra fuzz command...\n"); ModuleWriter writer; - writer.setDebug(options.debug); writer.setBinary(emitBinary); writer.setDebugInfo(options.passOptions.debugInfo); writer.write(wasm, options.extra["output"]); @@ -297,13 +295,13 @@ int main(int argc, const char* argv[]) { Module other; if (fuzzExecAfter && fuzzBinary) { - BufferWithRandomAccess buffer(false); + BufferWithRandomAccess buffer; // write the binary - WasmBinaryWriter writer(&wasm, buffer, false); + WasmBinaryWriter writer(&wasm, buffer); writer.write(); // read the binary auto input = buffer.getAsChars(); - WasmBinaryBuilder parser(other, input, false); + WasmBinaryBuilder parser(other, input); parser.read(); options.applyFeatures(other); if (options.passOptions.validate) { @@ -368,7 +366,6 @@ int main(int argc, const char* argv[]) { BYN_TRACE("writing...\n"); ModuleWriter writer; - writer.setDebug(options.debug); writer.setBinary(emitBinary); writer.setDebugInfo(options.passOptions.debugInfo); if (outputSourceMapFilename.size()) { |