File tree 1 file changed +8
-5
lines changed 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -129,22 +129,24 @@ void goto_trace_stept::output(
129
129
// / \param expr: expression to get numeric representation from
130
130
// / \param options: configuration options
131
131
// / \return a string with the numeric representation
132
- static std::string
133
- numeric_representation (const exprt &expr, const trace_optionst &options)
132
+ static std::string numeric_representation (
133
+ const constant_exprt &expr,
134
+ const trace_optionst &options)
134
135
{
135
136
std::string result;
136
137
std::string prefix;
138
+
137
139
if (options.hex_representation )
138
140
{
139
141
mp_integer value_int =
140
- bv2integer (id2string (to_constant_expr ( expr) .get_value ()), false );
142
+ bv2integer (id2string (expr.get_value ()), false );
141
143
result = integer2string (value_int, 16 );
142
144
prefix = " 0x" ;
143
145
}
144
146
else
145
147
{
146
148
prefix = " 0b" ;
147
- result = expr.get_string (ID_value );
149
+ result = id2string ( expr.get_value () );
148
150
}
149
151
150
152
std::ostringstream oss;
@@ -181,7 +183,8 @@ std::string trace_numeric_value(
181
183
type.id ()==ID_c_enum ||
182
184
type.id ()==ID_c_enum_tag)
183
185
{
184
- const std::string &str = numeric_representation (expr, options);
186
+ const std::string &str =
187
+ numeric_representation (to_constant_expr (expr), options);
185
188
return str;
186
189
}
187
190
else if (type.id ()==ID_bool)
You can’t perform that action at this time.
0 commit comments