From a1b73df93e5a2fac4a7ac87fb1753c4eb518c8c0 Mon Sep 17 00:00:00 2001 From: Martin Nowack Date: Wed, 27 Mar 2019 11:33:07 +0000 Subject: Separate constraint set and constraint manager --- lib/Expr/ExprPPrinter.cpp | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'lib/Expr/ExprPPrinter.cpp') diff --git a/lib/Expr/ExprPPrinter.cpp b/lib/Expr/ExprPPrinter.cpp index 267be7e8..ba0458ae 100644 --- a/lib/Expr/ExprPPrinter.cpp +++ b/lib/Expr/ExprPPrinter.cpp @@ -472,7 +472,7 @@ void ExprPPrinter::printSingleExpr(llvm::raw_ostream &os, const ref &e) { } void ExprPPrinter::printConstraints(llvm::raw_ostream &os, - const ConstraintManager &constraints) { + const ConstraintSet &constraints) { printQuery(os, constraints, ConstantExpr::alloc(false, Expr::Bool)); } @@ -486,7 +486,7 @@ struct ArrayPtrsByName { } void ExprPPrinter::printQuery(llvm::raw_ostream &os, - const ConstraintManager &constraints, + const ConstraintSet &constraints, const ref &q, const ref *evalExprsBegin, const ref *evalExprsEnd, @@ -494,10 +494,9 @@ void ExprPPrinter::printQuery(llvm::raw_ostream &os, const Array * const *evalArraysEnd, bool printArrayDecls) { PPrinter p(os); - - for (ConstraintManager::const_iterator it = constraints.begin(), - ie = constraints.end(); it != ie; ++it) - p.scan(*it); + + for (const auto &constraint : constraints) + p.scan(constraint); p.scan(q); for (const ref *it = evalExprsBegin; it != evalExprsEnd; ++it) @@ -537,8 +536,7 @@ void ExprPPrinter::printQuery(llvm::raw_ostream &os, // Ident at constraint list; unsigned indent = PC.pos; - for (ConstraintManager::const_iterator it = constraints.begin(), - ie = constraints.end(); it != ie;) { + for (auto it = constraints.begin(), ie = constraints.end(); it != ie;) { p.print(*it, PC); ++it; if (it != ie) -- cgit 1.4.1