[analyzer] BasicConstraintManager: drop NE-constraints once we have a value.

This could conceivably cut down on state proliferation, although we don't
use BasicConstraintManager by default anymore. No functionality change.

llvm-svn: 156362
This commit is contained in:
Jordy Rose 2012-05-08 03:27:20 +00:00
parent 728be7f6ac
commit 675d541ab6
1 changed files with 3 additions and 1 deletions

View File

@ -333,7 +333,9 @@ BasicConstraintManager::assumeSymLE(ProgramStateRef state,
ProgramStateRef BasicConstraintManager::AddEQ(ProgramStateRef state,
SymbolRef sym,
const llvm::APSInt& V) {
// Create a new state with the old binding replaced.
// Now that we have an actual value, we can throw out the NE-set.
// Create a new state with the old bindings replaced.
state = state->remove<ConstNotEq>(sym);
return state->set<ConstEq>(sym, &getBasicVals().getValue(V));
}