summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2015-11-21 20:05:47 -0800
committerAlon Zakai <alonzakai@gmail.com>2015-11-21 20:05:47 -0800
commitec8eaa4cca92eaa64fa8179bc920dc1b5d65e7fa (patch)
tree3e01952b2b1585fe9f9fd1ab665ec27a6836f416 /src
parent8d146b65fe461fbf3fb3d04fd785cc5af4484b30 (diff)
downloadbinaryen-ec8eaa4cca92eaa64fa8179bc920dc1b5d65e7fa.tar.gz
binaryen-ec8eaa4cca92eaa64fa8179bc920dc1b5d65e7fa.tar.bz2
binaryen-ec8eaa4cca92eaa64fa8179bc920dc1b5d65e7fa.zip
clean up br printing
Diffstat (limited to 'src')
-rw-r--r--src/wasm.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/wasm.h b/src/wasm.h
index eb4d69fd4..b119a010f 100644
--- a/src/wasm.h
+++ b/src/wasm.h
@@ -406,6 +406,11 @@ public:
doIndent(o, indent) << name << '\n';
} else {
printOpening(o, "br ") << name;
+ if (!value) {
+ // avoid a new line just for the parens
+ o << ")";
+ return o;
+ }
incIndent(o, indent);
}
if (value) printFullLine(o, indent, value);