summaryrefslogtreecommitdiff
path: root/src/passes/Print.cpp
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2017-12-05 10:41:06 -0800
committerGitHub <noreply@github.com>2017-12-05 10:41:06 -0800
commit42acc22254c89b035bbaba512c86c1784545278d (patch)
tree056fcbd8d9cebb3d355c9bf06e26217be056acd5 /src/passes/Print.cpp
parent0d5a39f17a854b4241c2704a1269620687bb6a07 (diff)
downloadbinaryen-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.cpp6
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") << ' ';