Skip to content

Commit 4ea6c4c

Browse files
committed
Use proper APIs to obtain bitvector type width
1 parent 66b6d75 commit 4ea6c4c

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/util/simplify_expr_int.cpp

+1-2
Original file line numberDiff line numberDiff line change
@@ -1006,8 +1006,7 @@ bool simplify_exprt::simplify_shifts(exprt &expr)
10061006
if(expr.op0().type().id()==ID_unsignedbv ||
10071007
expr.op0().type().id()==ID_signedbv)
10081008
{
1009-
mp_integer width=
1010-
string2integer(id2string(expr.op0().type().get(ID_width)));
1009+
const std::size_t width = to_bitvector_type(expr.op0().type()).get_width();
10111010

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

0 commit comments

Comments
 (0)