|
20 | 20 | #include <util/prefix.h>
|
21 | 21 | #include <util/simplify_expr.h>
|
22 | 22 |
|
23 |
| -#include <langapi/language_util.h> |
24 | 23 | #include <util/range.h>
|
| 24 | +#include <util/format_expr.h> |
| 25 | +#include <util/format_type.h> |
25 | 26 |
|
26 | 27 | #ifdef DEBUG
|
27 | 28 | #include <iostream>
|
@@ -133,7 +134,7 @@ bool value_sett::insert(
|
133 | 134 | }
|
134 | 135 |
|
135 | 136 | void value_sett::output(
|
136 |
| - const namespacet &ns, |
| 137 | + const namespacet &, |
137 | 138 | std::ostream &out,
|
138 | 139 | const std::string &indent) const
|
139 | 140 | {
|
@@ -174,29 +175,29 @@ void value_sett::output(
|
174 | 175 | {
|
175 | 176 | const exprt &o = object_numbering[o_it->first];
|
176 | 177 |
|
177 |
| - std::string result; |
| 178 | + std::ostringstream stream; |
178 | 179 |
|
179 | 180 | if(o.id() == ID_invalid || o.id() == ID_unknown)
|
180 |
| - result = from_expr(ns, identifier, o); |
| 181 | + stream << format(o); |
181 | 182 | else
|
182 | 183 | {
|
183 |
| - result = "<" + from_expr(ns, identifier, o) + ", "; |
| 184 | + stream << "<" << format(o) << ", "; |
184 | 185 |
|
185 | 186 | if(o_it->second)
|
186 |
| - result += integer2string(*o_it->second); |
| 187 | + stream << *o_it->second; |
187 | 188 | else
|
188 |
| - result += '*'; |
| 189 | + stream << '*'; |
189 | 190 |
|
190 | 191 | if(o.type().is_nil())
|
191 |
| - result += ", ?"; |
| 192 | + stream << ", ?"; |
192 | 193 | else
|
193 |
| - result += ", " + from_type(ns, identifier, o.type()); |
| 194 | + stream << ", " << format(o.type()); |
194 | 195 |
|
195 |
| - result += '>'; |
| 196 | + stream << '>'; |
196 | 197 | }
|
197 | 198 |
|
| 199 | + const std::string result = stream.str(); |
198 | 200 | out << result;
|
199 |
| - |
200 | 201 | width += result.size();
|
201 | 202 |
|
202 | 203 | object_map_dt::const_iterator next(o_it);
|
|
0 commit comments