| 91 | } |
| 92 | |
| 93 | void tools::print_model_val(ostream &os, State &st, const Model &m, |
| 94 | const Value *var, const Type &type, |
| 95 | const StateValue &val, unsigned child) { |
| 96 | if (!type.isAggregateType()) { |
| 97 | print_single_varval(os, st, m, var, type, val, child); |
| 98 | return; |
| 99 | } |
| 100 | |
| 101 | os << (type.isStructType() ? "{ " : "< "); |
| 102 | auto agg = type.getAsAggregateType(); |
| 103 | for (unsigned i = 0, e = agg->numElementsConst(); i < e; ++i) { |
| 104 | if (i != 0) |
| 105 | os << ", "; |
| 106 | tools::print_model_val(os, st, m, var, agg->getChild(i), |
| 107 | agg->extract(val, i), child + i); |
| 108 | } |
| 109 | os << (type.isStructType() ? " }" : " >"); |
| 110 | } |
| 111 | |
| 112 | |
| 113 | using print_var_val_ty = function<void(ostream&, const Model&)>; |
nothing calls this directly
no test coverage detected