diff options
author | Alon Zakai <azakai@google.com> | 2022-01-07 16:45:42 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-07 16:45:42 -0800 |
commit | 1ef8f1f2c3fcecc6906e8fd40184f3e81b2d1838 (patch) | |
tree | a2b7114f1559f2ce62053797f8e82a46c2075df5 | |
parent | ce8750b7a6b129849a38141f730a25bcbc3712e8 (diff) | |
download | binaryen-1ef8f1f2c3fcecc6906e8fd40184f3e81b2d1838.tar.gz binaryen-1ef8f1f2c3fcecc6906e8fd40184f3e81b2d1838.tar.bz2 binaryen-1ef8f1f2c3fcecc6906e8fd40184f3e81b2d1838.zip |
[ctor-eval] Switch logging from stderr to stdout (#4432)
This logging is central to what this tool does, and not optional, so stdout
makes more sense I think. Also, as I'm re-integrating this on the emscripten
side, this makes it simpler.
-rw-r--r-- | src/tools/wasm-ctor-eval.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/tools/wasm-ctor-eval.cpp b/src/tools/wasm-ctor-eval.cpp index 88b7d18b4..ef66aed35 100644 --- a/src/tools/wasm-ctor-eval.cpp +++ b/src/tools/wasm-ctor-eval.cpp @@ -500,7 +500,7 @@ void evalCtors(Module& wasm, std::vector<std::string> ctors) { // go one by one, in order, until we fail // TODO: if we knew priorities, we could reorder? for (auto& ctor : ctors) { - std::cerr << "trying to eval " << ctor << '\n'; + std::cout << "trying to eval " << ctor << '\n'; Export* ex = wasm.getExportOrNull(ctor); if (!ex) { Fatal() << "export not found: " << ctor; @@ -510,10 +510,10 @@ void evalCtors(Module& wasm, std::vector<std::string> ctors) { } catch (FailToEvalException& fail) { // that's it, we failed, so stop here, cleaning up partial // memory changes first - std::cerr << " ...stopping since could not eval: " << fail.why << "\n"; + std::cout << " ...stopping since could not eval: " << fail.why << "\n"; return; } - std::cerr << " ...success on " << ctor << ".\n"; + std::cout << " ...success on " << ctor << ".\n"; // Success, the entire function was evalled! Apply the results of // execution to the module. @@ -528,7 +528,7 @@ void evalCtors(Module& wasm, std::vector<std::string> ctors) { } } catch (FailToEvalException& fail) { // that's it, we failed to even create the instance - std::cerr << " ...stopping since could not create module instance: " + std::cout << " ...stopping since could not create module instance: " << fail.why << "\n"; return; } @@ -600,13 +600,13 @@ int main(int argc, const char* argv[]) { { if (options.debug) { - std::cerr << "reading...\n"; + std::cout << "reading...\n"; } ModuleReader reader; try { reader.read(options.extra["infile"], wasm); } catch (ParseException& p) { - p.dump(std::cerr); + p.dump(std::cout); Fatal() << "error in parsing input"; } } @@ -639,7 +639,7 @@ int main(int argc, const char* argv[]) { if (options.extra.count("output") > 0) { if (options.debug) { - std::cerr << "writing..." << std::endl; + std::cout << "writing..." << std::endl; } ModuleWriter writer; writer.setBinary(emitBinary); |