diff options
Diffstat (limited to 'lib/Core/ExecutionState.cpp')
-rw-r--r-- | lib/Core/ExecutionState.cpp | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/lib/Core/ExecutionState.cpp b/lib/Core/ExecutionState.cpp index 14d596fc..0b848f41 100644 --- a/lib/Core/ExecutionState.cpp +++ b/lib/Core/ExecutionState.cpp @@ -310,11 +310,12 @@ bool ExecutionState::merge(const ExecutionState &b) { } } - constraints = ConstraintManager(); - for (std::set< ref<Expr> >::iterator it = commonConstraints.begin(), - ie = commonConstraints.end(); it != ie; ++it) - constraints.addConstraint(*it); - constraints.addConstraint(OrExpr::create(inA, inB)); + constraints = ConstraintSet(); + + ConstraintManager m(constraints); + for (const auto &constraint : commonConstraints) + m.addConstraint(constraint); + m.addConstraint(OrExpr::create(inA, inB)); return true; } @@ -352,3 +353,8 @@ void ExecutionState::dumpStack(llvm::raw_ostream &out) const { target = sf.caller; } } + +void ExecutionState::addConstraint(ref<Expr> e) { + ConstraintManager c(constraints); + c.addConstraint(e); +} |