diff options
author | Alon Zakai <alonzakai@gmail.com> | 2017-12-05 10:41:06 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-12-05 10:41:06 -0800 |
commit | 42acc22254c89b035bbaba512c86c1784545278d (patch) | |
tree | 056fcbd8d9cebb3d355c9bf06e26217be056acd5 /src/passes/Print.cpp | |
parent | 0d5a39f17a854b4241c2704a1269620687bb6a07 (diff) | |
download | binaryen-42acc22254c89b035bbaba512c86c1784545278d.tar.gz binaryen-42acc22254c89b035bbaba512c86c1784545278d.tar.bz2 binaryen-42acc22254c89b035bbaba512c86c1784545278d.zip |
support fixed (non-relocatable) segments in wasm-merge. also a few printing fixes for multiple segments, which we never really printed that prettily (#1316)
Diffstat (limited to 'src/passes/Print.cpp')
-rw-r--r-- | src/passes/Print.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/passes/Print.cpp b/src/passes/Print.cpp index 2f7588b37..cfdfc09dd 100644 --- a/src/passes/Print.cpp +++ b/src/passes/Print.cpp @@ -741,20 +741,18 @@ struct PrintSExpression : public Visitor<PrintSExpression> { printTableHeader(curr); o << maybeNewLine; } - if (curr->segments.empty()) return; - doIndent(o, indent); for (auto& segment : curr->segments) { // Don't print empty segments if (segment.data.empty()) continue; + doIndent(o, indent); printOpening(o, "elem ", true); visit(segment.offset); for (auto name : segment.data) { o << ' '; printName(name); } - o << ')'; + o << ")\n"; } - o << maybeNewLine; } void printMemoryHeader(Memory* curr) { printOpening(o, "memory") << ' '; |