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/asm2wasm.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/asm2wasm.cpp')
-rw-r--r-- | src/tools/asm2wasm.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/tools/asm2wasm.cpp b/src/tools/asm2wasm.cpp index 083f3386b..b54dd8cd8 100644 --- a/src/tools/asm2wasm.cpp +++ b/src/tools/asm2wasm.cpp @@ -199,10 +199,8 @@ int main(int argc, const char* argv[]) { // debug info is disabled if a map file is not specified with wasm binary pre.debugInfo = options.passOptions.debugInfo && (!emitBinary || sourceMapFilename.size()); - auto input(read_file<std::vector<char>>(options.extra["infile"], - Flags::Text, - options.debug ? Flags::Debug - : Flags::Release)); + auto input( + read_file<std::vector<char>>(options.extra["infile"], Flags::Text)); char* start = pre.process(input.data()); if (options.debug) { @@ -224,8 +222,7 @@ int main(int argc, const char* argv[]) { const auto& memInit = options.extra.find("mem init"); if (memInit != options.extra.end()) { auto filename = memInit->second.c_str(); - auto data(read_file<std::vector<char>>( - filename, Flags::Binary, options.debug ? Flags::Debug : Flags::Release)); + auto data(read_file<std::vector<char>>(filename, Flags::Binary)); // create the memory segment Expression* init; const auto& memBase = options.extra.find("mem base"); @@ -293,7 +290,6 @@ int main(int argc, const char* argv[]) { std::cerr << "emitting..." << std::endl; } ModuleWriter writer; - writer.setDebug(options.debug); writer.setDebugInfo(options.passOptions.debugInfo); writer.setSymbolMap(symbolMap); writer.setBinary(emitBinary); |