Skip to content

Commit e29fd12

Browse files
authored
Merge pull request #2494 from diffblue/remove-unused-byte-extract
Remove dead code: byte_extract_(big|little)_endian
2 parents 8730366 + b18b031 commit e29fd12

File tree

1 file changed

+0
-151
lines changed

1 file changed

+0
-151
lines changed

src/util/byte_operators.h

-151
Original file line numberDiff line numberDiff line change
@@ -65,88 +65,11 @@ inline byte_extract_exprt &to_byte_extract_expr(exprt &expr)
6565
irep_idt byte_extract_id();
6666
irep_idt byte_update_id();
6767

68-
/*! \brief TO_BE_DOCUMENTED
69-
*/
70-
class byte_extract_little_endian_exprt:public byte_extract_exprt
71-
{
72-
public:
73-
byte_extract_little_endian_exprt():
74-
byte_extract_exprt(ID_byte_extract_little_endian)
75-
{
76-
}
77-
};
78-
79-
inline const byte_extract_little_endian_exprt
80-
&to_byte_extract_little_endian_expr(const exprt &expr)
81-
{
82-
PRECONDITION(expr.id() == ID_byte_extract_little_endian);
83-
DATA_INVARIANT(
84-
expr.operands().size() == 2, "byte extract expressions have two operands");
85-
86-
return static_cast<const byte_extract_little_endian_exprt &>(expr);
87-
}
88-
89-
inline byte_extract_little_endian_exprt
90-
&to_byte_extract_little_endian_expr(exprt &expr)
91-
{
92-
PRECONDITION(expr.id() == ID_byte_extract_little_endian);
93-
DATA_INVARIANT(
94-
expr.operands().size() == 2, "byte extract expressions have two operands");
95-
96-
return static_cast<byte_extract_little_endian_exprt &>(expr);
97-
}
98-
99-
/*! \brief TO_BE_DOCUMENTED
100-
*/
101-
class byte_extract_big_endian_exprt:public byte_extract_exprt
102-
{
103-
public:
104-
byte_extract_big_endian_exprt():
105-
byte_extract_exprt(ID_byte_extract_big_endian)
106-
{
107-
}
108-
109-
byte_extract_big_endian_exprt(
110-
const exprt &_op, const exprt &_offset, const typet &_type):
111-
byte_extract_exprt(ID_byte_extract_big_endian, _op, _offset, _type)
112-
{
113-
}
114-
};
115-
116-
inline const byte_extract_big_endian_exprt
117-
&to_byte_extract_big_endian_expr(const exprt &expr)
118-
{
119-
PRECONDITION(expr.id() == ID_byte_extract_big_endian);
120-
DATA_INVARIANT(
121-
expr.operands().size() == 2, "byte extract expressions have two operands");
122-
123-
return static_cast<const byte_extract_big_endian_exprt &>(expr);
124-
}
125-
126-
inline byte_extract_big_endian_exprt
127-
&to_byte_extract_big_endian_expr(exprt &expr)
128-
{
129-
PRECONDITION(expr.id() == ID_byte_extract_big_endian);
130-
DATA_INVARIANT(
131-
expr.operands().size() == 2, "byte extract expressions have two operands");
132-
133-
return static_cast<byte_extract_big_endian_exprt &>(expr);
134-
}
135-
13668
/*! \brief TO_BE_DOCUMENTED
13769
*/
13870
class byte_update_exprt : public ternary_exprt
13971
{
14072
public:
141-
explicit byte_update_exprt(irep_idt _id) : ternary_exprt(_id)
142-
{
143-
}
144-
145-
byte_update_exprt(irep_idt _id, const typet &_type)
146-
: ternary_exprt(_id, _type)
147-
{
148-
}
149-
15073
byte_update_exprt(
15174
irep_idt _id,
15275
const exprt &_op,
@@ -177,78 +100,4 @@ inline byte_update_exprt &to_byte_update_expr(exprt &expr)
177100
return static_cast<byte_update_exprt &>(expr);
178101
}
179102

180-
/*! \brief TO_BE_DOCUMENTED
181-
*/
182-
class byte_update_little_endian_exprt:public byte_update_exprt
183-
{
184-
public:
185-
byte_update_little_endian_exprt():
186-
byte_update_exprt(ID_byte_update_little_endian)
187-
{
188-
}
189-
190-
byte_update_little_endian_exprt(
191-
const exprt &_op, const exprt &_offset, const exprt &_value):
192-
byte_update_exprt(ID_byte_update_little_endian, _op, _offset, _value)
193-
{
194-
}
195-
};
196-
197-
inline const byte_update_little_endian_exprt
198-
&to_byte_update_little_endian_expr(const exprt &expr)
199-
{
200-
PRECONDITION(expr.id() == ID_byte_update_little_endian);
201-
DATA_INVARIANT(
202-
expr.operands().size() == 3, "byte update expressions have three operands");
203-
204-
return static_cast<const byte_update_little_endian_exprt &>(expr);
205-
}
206-
207-
inline byte_update_little_endian_exprt
208-
&to_byte_update_little_endian_expr(exprt &expr)
209-
{
210-
PRECONDITION(expr.id() == ID_byte_update_little_endian);
211-
DATA_INVARIANT(
212-
expr.operands().size() == 3, "byte update expressions have three operands");
213-
214-
return static_cast<byte_update_little_endian_exprt &>(expr);
215-
}
216-
217-
/*! \brief TO_BE_DOCUMENTED
218-
*/
219-
class byte_update_big_endian_exprt:public byte_update_exprt
220-
{
221-
public:
222-
byte_update_big_endian_exprt():
223-
byte_update_exprt(ID_byte_update_big_endian)
224-
{
225-
}
226-
227-
byte_update_big_endian_exprt(
228-
const exprt &_op, const exprt &_offset, const exprt &_value):
229-
byte_update_exprt(ID_byte_update_big_endian, _op, _offset, _value)
230-
{
231-
}
232-
};
233-
234-
inline const byte_update_big_endian_exprt
235-
&to_byte_update_big_endian_expr(const exprt &expr)
236-
{
237-
PRECONDITION(expr.id() == ID_byte_update_big_endian);
238-
DATA_INVARIANT(
239-
expr.operands().size() == 3, "byte update expressions have three operands");
240-
241-
return static_cast<const byte_update_big_endian_exprt &>(expr);
242-
}
243-
244-
inline byte_update_big_endian_exprt
245-
&to_byte_update_big_endian_expr(exprt &expr)
246-
{
247-
PRECONDITION(expr.id() == ID_byte_update_big_endian);
248-
DATA_INVARIANT(
249-
expr.operands().size() == 3, "byte update expressions have three operands");
250-
251-
return static_cast<byte_update_big_endian_exprt &>(expr);
252-
}
253-
254103
#endif // CPROVER_UTIL_BYTE_OPERATORS_H

0 commit comments

Comments
 (0)