diff options
author | Alon Zakai <azakai@google.com> | 2023-01-09 09:29:21 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-09 09:29:21 -0800 |
commit | c049a24c12cc9420f2a6e13bc4b1549922ec5d1f (patch) | |
tree | 1d0e825e5c032c03da32eb746d2ca72ef29acc4b /src | |
parent | dea55e161497b9c7beaaa9fb3cdff003060ac391 (diff) | |
download | binaryen-c049a24c12cc9420f2a6e13bc4b1549922ec5d1f.tar.gz binaryen-c049a24c12cc9420f2a6e13bc4b1549922ec5d1f.tar.bz2 binaryen-c049a24c12cc9420f2a6e13bc4b1549922ec5d1f.zip |
[Wasm GC] Add missing unreachable check in evaluateKindCheck (#5410)
Diffstat (limited to 'src')
-rw-r--r-- | src/ir/gc-type-utils.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/ir/gc-type-utils.h b/src/ir/gc-type-utils.h index 8832d4d0f..1646e47c3 100644 --- a/src/ir/gc-type-utils.h +++ b/src/ir/gc-type-utils.h @@ -123,7 +123,9 @@ inline EvaluationResult evaluateKindCheck(Expression* curr) { Kind actual; - if (childType.isFunction()) { + if (childType == Type::unreachable) { + return Unknown; + } else if (childType.isFunction()) { actual = Func; } else if (childType.isData()) { actual = Data; |