From 512b9f16e1c7ef23c8adc25cb435517de6bf3e81 Mon Sep 17 00:00:00 2001 From: Martin Nowack Date: Sun, 9 Aug 2015 23:53:13 +0200 Subject: [Solver]Add simple option to dump queries --- lib/Solver/Solver.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'lib') diff --git a/lib/Solver/Solver.cpp b/lib/Solver/Solver.cpp index 3903ab0d..07331fa4 100644 --- a/lib/Solver/Solver.cpp +++ b/lib/Solver/Solver.cpp @@ -1267,4 +1267,16 @@ template class MetaSMTSolver< DirectSolver_Context < Z3_Backend> >; template class MetaSMTSolver< DirectSolver_Context < STP_Backend> >; #endif /* SUPPORT_METASMT */ +/// +void Query::dump() const { + llvm::errs() << "Constraints [\n"; + for (ConstraintManager::const_iterator i = constraints.begin(); + i != constraints.end(); i++) { + (*i)->dump(); + } + llvm::errs() << "]\n"; + llvm::errs() << "Query [\n"; + expr->dump(); + llvm::errs() << "]\n"; +} -- cgit 1.4.1