diff options
author | Alon Zakai <azakai@google.com> | 2022-11-29 13:34:42 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-29 21:34:42 +0000 |
commit | 2080165d06bce06f0ac3a3aa85f6a7a4c5e8ff04 (patch) | |
tree | 3749a1c2b041fd4c55b120a5ff509c616ed54bd4 | |
parent | 5a58d1132feebb902c30cb95b1f74673e490ad52 (diff) | |
download | binaryen-2080165d06bce06f0ac3a3aa85f6a7a4c5e8ff04.tar.gz binaryen-2080165d06bce06f0ac3a3aa85f6a7a4c5e8ff04.tar.bz2 binaryen-2080165d06bce06f0ac3a3aa85f6a7a4c5e8ff04.zip |
[NFC] Remove unneeded check (#5300)
The caller fills the map with what is relevant anyhow, so we don't need to check
before looking for an item in the map.
-rw-r--r-- | src/ir/type-updating.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/ir/type-updating.cpp b/src/ir/type-updating.cpp index 08c04e8d4..3eb29e43c 100644 --- a/src/ir/type-updating.cpp +++ b/src/ir/type-updating.cpp @@ -147,11 +147,9 @@ void GlobalTypeRewriter::mapTypes(const TypeMap& oldToNewTypes) { if (type.isBasic()) { return type; } - if (type.isFunction() || type.isData()) { - auto iter = oldToNewTypes.find(type); - if (iter != oldToNewTypes.end()) { - return iter->second; - } + auto iter = oldToNewTypes.find(type); + if (iter != oldToNewTypes.end()) { + return iter->second; } return type; } |