diff options
author | Thomas Lively <7121787+tlively@users.noreply.github.com> | 2020-12-09 14:28:48 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-09 14:28:48 -0800 |
commit | bdc55d3781e55f7d51d2e21751e07f9ec6161c27 (patch) | |
tree | 15f4c87ab6e69a00f29d80002d054d3afaf8eafc /src/wasm-type.h | |
parent | 64d2aef103ce19f280cff34e5a60f5035cacaa29 (diff) | |
download | binaryen-bdc55d3781e55f7d51d2e21751e07f9ec6161c27.tar.gz binaryen-bdc55d3781e55f7d51d2e21751e07f9ec6161c27.tar.bz2 binaryen-bdc55d3781e55f7d51d2e21751e07f9ec6161c27.zip |
Small RTT cleanups (#3434)
Diffstat (limited to 'src/wasm-type.h')
-rw-r--r-- | src/wasm-type.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/wasm-type.h b/src/wasm-type.h index f600f2e79..11980642b 100644 --- a/src/wasm-type.h +++ b/src/wasm-type.h @@ -174,10 +174,12 @@ public: // Returns the feature set required to use this type. FeatureSet getFeatures() const; - // Gets the heap type corresponding to this type + // Gets the heap type corresponding to this type, assuming that it is a + // reference or Rtt type. HeapType getHeapType() const; - const struct Rtt& getRtt() const; + // Gets the Rtt for this type, assuming that it is an Rtt type. + Rtt getRtt() const; // Returns a number type based on its size in bytes and whether it is a float // type. @@ -432,10 +434,8 @@ struct Array { }; struct Rtt { - enum { - // An Rtt can have no depth specified - NoDepth = -1 - }; + // An Rtt can have no depth specified + static constexpr uint32_t NoDepth = -1; uint32_t depth; HeapType heapType; Rtt(HeapType heapType) : depth(NoDepth), heapType(heapType) {} |