diff --git a/lib/Solver/CachingSolver.cpp b/lib/Solver/CachingSolver.cpp index a84b686474..0bf904a60a 100644 --- a/lib/Solver/CachingSolver.cpp +++ b/lib/Solver/CachingSolver.cpp @@ -223,19 +223,11 @@ bool CachingSolver::computeValidity(const Query &query, if (!solver->impl->computeValidity(query, result)) return false; - switch (result) { - case PValidity::MustBeTrue: - cachedResult = PValidity::MustBeTrue; - break; - case PValidity::MustBeFalse: - cachedResult = PValidity::MustBeFalse; - break; - default: - cachedResult = PValidity::TrueOrFalse; - break; - } + cachedResult = result; + assert(cachedResult != PValidity::None); cacheInsert(query, cachedResult); + return true; }