diff options
author | Alon Zakai <azakai@google.com> | 2023-04-19 09:42:36 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-19 09:42:36 -0700 |
commit | 68ea69fc14165b715fc1eff886b0b0ba0025a85e (patch) | |
tree | 0d4e3eb86c41d7bdbb7522232b2d0e010bfdd05f /src/tools/fuzzing/fuzzing.cpp | |
parent | edf9087c5551947236512e5f8b3eab29b03dc1d0 (diff) | |
download | binaryen-68ea69fc14165b715fc1eff886b0b0ba0025a85e.tar.gz binaryen-68ea69fc14165b715fc1eff886b0b0ba0025a85e.tar.bz2 binaryen-68ea69fc14165b715fc1eff886b0b0ba0025a85e.zip |
Fuzzer: Use subtype consistently in make() (#5674)
Diffstat (limited to 'src/tools/fuzzing/fuzzing.cpp')
-rw-r--r-- | src/tools/fuzzing/fuzzing.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/tools/fuzzing/fuzzing.cpp b/src/tools/fuzzing/fuzzing.cpp index 74d209493..cfc0d9ed8 100644 --- a/src/tools/fuzzing/fuzzing.cpp +++ b/src/tools/fuzzing/fuzzing.cpp @@ -1055,7 +1055,7 @@ void TranslateToFuzzReader::addInvocations(Function* func) { } Expression* TranslateToFuzzReader::make(Type type) { - auto subtype = getSubType(type); + type = getSubType(type); if (trivialNesting) { // We are nested under a makeTrivial call, so only emit something trivial. return makeTrivial(type); @@ -1065,9 +1065,9 @@ Expression* TranslateToFuzzReader::make(Type type) { (nesting >= NESTING_LIMIT && !oneIn(3))) { if (type.isConcrete()) { if (oneIn(2)) { - return makeConst(subtype); + return makeConst(type); } else { - return makeLocalGet(subtype); + return makeLocalGet(type); } } else if (type == Type::none) { if (oneIn(2)) { @@ -1082,7 +1082,7 @@ Expression* TranslateToFuzzReader::make(Type type) { nesting++; Expression* ret = nullptr; if (type.isConcrete()) { - ret = _makeConcrete(subtype); + ret = _makeConcrete(type); } else if (type == Type::none) { ret = _makenone(); } else { |