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/passes/RemoveNonJSOps.cpp | |
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/passes/RemoveNonJSOps.cpp')
-rw-r--r-- | src/passes/RemoveNonJSOps.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/passes/RemoveNonJSOps.cpp b/src/passes/RemoveNonJSOps.cpp index d758440f2..1866877c0 100644 --- a/src/passes/RemoveNonJSOps.cpp +++ b/src/passes/RemoveNonJSOps.cpp @@ -157,7 +157,7 @@ struct RemoveNonJSOpsPass : public WalkerPass<PostWalker<RemoveNonJSOpsPass>> { // Switch unaligned loads of floats to unaligned loads of integers (which we // can actually implement) and then use reinterpretation to get the float // back out. - switch (curr->type) { + switch (curr->type.getSingle()) { case Type::f32: curr->type = Type::i32; replaceCurrent(builder->makeUnary(ReinterpretInt32, curr)); @@ -179,7 +179,7 @@ struct RemoveNonJSOpsPass : public WalkerPass<PostWalker<RemoveNonJSOpsPass>> { // Switch unaligned stores of floats to unaligned stores of integers (which // we can actually implement) and then use reinterpretation to store the // right value. - switch (curr->valueType) { + switch (curr->valueType.getSingle()) { case Type::f32: curr->valueType = Type::i32; curr->value = builder->makeUnary(ReinterpretFloat32, curr->value); |