diff options
author | Thomas Lively <7121787+tlively@users.noreply.github.com> | 2019-11-13 14:17:29 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-11-13 14:17:29 -0800 |
commit | 24bb5d83b1b877638053a5f8761ab8372aeeeac9 (patch) | |
tree | 5c072765ea269d0bb56f1e65f436424c08041f69 /src/wasm/literal.cpp | |
parent | 284e3946029d347b8bf1dc189988081a5636f89f (diff) | |
download | binaryen-24bb5d83b1b877638053a5f8761ab8372aeeeac9.tar.gz binaryen-24bb5d83b1b877638053a5f8761ab8372aeeeac9.tar.bz2 binaryen-24bb5d83b1b877638053a5f8761ab8372aeeeac9.zip |
[NFC] Make Type a class instead of enum (#2433)
The plan is to extend `Type` to represent arbitrary multivalue types,
and as a prerequisite for that it is necessary to make it a class
instead of an enum. This PR bends over backwards to add all the
automatic conversions and constants necessary to allow the rest of the
code to compile unmodified, but in the future it should be possible to
standardize usage across the code base and remove some of these
utilities.
Diffstat (limited to 'src/wasm/literal.cpp')
-rw-r--r-- | src/wasm/literal.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/wasm/literal.cpp b/src/wasm/literal.cpp index 41d98dea3..8d8868eb4 100644 --- a/src/wasm/literal.cpp +++ b/src/wasm/literal.cpp @@ -1286,7 +1286,8 @@ Literal Literal::shuffleV8x16(const Literal& other, return Literal(bytes); } -template<Type Ty, int Lanes> static Literal splat(const Literal& val) { +template<Type::ValueType Ty, int Lanes> +static Literal splat(const Literal& val) { assert(val.type == Ty); LaneArray<Lanes> lanes; lanes.fill(val); |