Skip to content

Commit 18c6c1f

Browse files
committed
Use proper APIs to obtain bitvector type width
1 parent bda63c9 commit 18c6c1f

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/util/simplify_expr_int.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1005,8 +1005,7 @@ bool simplify_exprt::simplify_shifts(exprt &expr)
10051005
if(expr.op0().type().id()==ID_unsignedbv ||
10061006
expr.op0().type().id()==ID_signedbv)
10071007
{
1008-
mp_integer width=
1009-
string2integer(id2string(expr.op0().type().get(ID_width)));
1008+
const std::size_t width = to_bitvector_type(expr.op0().type()).get_width();
10101009

10111010
if(expr.id()==ID_lshr)
10121011
{

0 commit comments

Comments
 (0)