diff options
author | Alon Zakai <alonzakai@gmail.com> | 2016-04-27 19:25:15 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2016-04-27 19:25:15 -0700 |
commit | 6a6bdc1cef5ec35cb9f7caf6e10ec76ee1107d0d (patch) | |
tree | 9ed1b23b55c86f8fa1aee285bfdde9d47c2f1ae8 /src/passes/Print.cpp | |
parent | 4a85f62e8a83117a081e9691d8830b6a7a876d1d (diff) | |
parent | f0a4f15dc27ffff9505503a8168854b7662b2657 (diff) | |
download | binaryen-6a6bdc1cef5ec35cb9f7caf6e10ec76ee1107d0d.tar.gz binaryen-6a6bdc1cef5ec35cb9f7caf6e10ec76ee1107d0d.tar.bz2 binaryen-6a6bdc1cef5ec35cb9f7caf6e10ec76ee1107d0d.zip |
Merge pull request #403 from WebAssembly/leaks
Fix leaks and enable leak checks
Diffstat (limited to 'src/passes/Print.cpp')
-rw-r--r-- | src/passes/Print.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/passes/Print.cpp b/src/passes/Print.cpp index eb0a6d33b..1a62de4f3 100644 --- a/src/passes/Print.cpp +++ b/src/passes/Print.cpp @@ -485,7 +485,7 @@ struct PrintSExpression : public Visitor<PrintSExpression> { for (auto segment : curr->memory.segments) { o << maybeNewLine; o << (minify ? "" : " ") << "(segment " << segment.offset << " \""; - for (size_t i = 0; i < segment.size; i++) { + for (size_t i = 0; i < segment.data.size(); i++) { unsigned char c = segment.data[i]; switch (c) { case '\n': o << "\\n"; break; @@ -522,17 +522,17 @@ struct PrintSExpression : public Visitor<PrintSExpression> { } for (auto& child : curr->functionTypes) { doIndent(o, indent); - visitFunctionType(child, true); + visitFunctionType(child.get(), true); o << maybeNewLine; } for (auto& child : curr->imports) { doIndent(o, indent); - visitImport(child); + visitImport(child.get()); o << maybeNewLine; } for (auto& child : curr->exports) { doIndent(o, indent); - visitExport(child); + visitExport(child.get()); o << maybeNewLine; } if (curr->table.names.size() > 0) { @@ -542,7 +542,7 @@ struct PrintSExpression : public Visitor<PrintSExpression> { } for (auto& child : curr->functions) { doIndent(o, indent); - visitFunction(child); + visitFunction(child.get()); o << maybeNewLine; } decIndent(); |