From 68ea69fc14165b715fc1eff886b0b0ba0025a85e Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Wed, 19 Apr 2023 09:42:36 -0700 Subject: Fuzzer: Use subtype consistently in make() (#5674) --- src/tools/fuzzing/fuzzing.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/tools/fuzzing/fuzzing.cpp') 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 { -- cgit v1.2.3