summaryrefslogtreecommitdiff
path: root/src/wasm-validator.h
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2017-09-18 16:33:06 -0700
committerGitHub <noreply@github.com>2017-09-18 16:33:06 -0700
commit0532093e5856662a11cf66cbf59feaeb3acb9c29 (patch)
treef0ec2dfa924c6a57f8d29886d89a23c5980ced45 /src/wasm-validator.h
parent8f2f6a13736336ca13d6b4bccb1af6d34f3aae48 (diff)
downloadbinaryen-0532093e5856662a11cf66cbf59feaeb3acb9c29.tar.gz
binaryen-0532093e5856662a11cf66cbf59feaeb3acb9c29.tar.bz2
binaryen-0532093e5856662a11cf66cbf59feaeb3acb9c29.zip
Expressions should not appear twice in the ast (#1191)
Diffstat (limited to 'src/wasm-validator.h')
-rw-r--r--src/wasm-validator.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/wasm-validator.h b/src/wasm-validator.h
index 0851d33e8..ceaaee890 100644
--- a/src/wasm-validator.h
+++ b/src/wasm-validator.h
@@ -39,6 +39,7 @@
#include <set>
#include <sstream>
+#include <unordered_set>
#include "wasm.h"
#include "wasm-printing.h"
@@ -83,6 +84,8 @@ struct WasmValidator : public PostWalker<WasmValidator> {
std::set<Name> labelNames; // Binaryen IR requires that label names must be unique - IR generators must ensure that
+ std::unordered_set<Expression*> seenExpressions; // expressions must not appear twice
+
void noteLabelName(Name name);
public: