diff options
author | Thomas Lively <7121787+tlively@users.noreply.github.com> | 2020-01-08 17:43:25 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-08 17:43:25 -0800 |
commit | 77329439d6307d292e59986db3a194c3085abbe2 (patch) | |
tree | ac9f4ad3787f2e0d3644d34ff324a546380a17fd /src/ir/hashed.h | |
parent | 8d4db9fb86c3b80df3eaa0d8e5eb379d081c8399 (diff) | |
download | binaryen-77329439d6307d292e59986db3a194c3085abbe2.tar.gz binaryen-77329439d6307d292e59986db3a194c3085abbe2.tar.bz2 binaryen-77329439d6307d292e59986db3a194c3085abbe2.zip |
Remove implicit conversion operators from Type (#2577)
* Remove implicit conversion operators from Type
Now types must be explicitly converted to uint32_t with Type::getID or
to ValueType with Type::getVT. This fixes #2572 for switches that use
Type::getVT.
* getVT => getSingle
Diffstat (limited to 'src/ir/hashed.h')
-rw-r--r-- | src/ir/hashed.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/ir/hashed.h b/src/ir/hashed.h index 9e9717cda..fe0a0b958 100644 --- a/src/ir/hashed.h +++ b/src/ir/hashed.h @@ -82,10 +82,10 @@ struct FunctionHasher : public WalkerPass<PostWalker<FunctionHasher>> { static HashType hashFunction(Function* func) { HashType ret = 0; - ret = rehash(ret, (HashType)func->sig.params); - ret = rehash(ret, (HashType)func->sig.results); + ret = rehash(ret, (HashType)func->sig.params.getID()); + ret = rehash(ret, (HashType)func->sig.results.getID()); for (auto type : func->vars) { - ret = rehash(ret, (HashType)type); + ret = rehash(ret, (HashType)type.getSingle()); } ret = rehash(ret, (HashType)ExpressionAnalyzer::hash(func->body)); return ret; |