Skip to content

Commit 72fa110

Browse files
committed
Remove now-unused byte-operator flattening exceptions
We now handle additional cases, and don't throw either of those anymore.
1 parent df67f1a commit 72fa110

File tree

1 file changed

+0
-61
lines changed

1 file changed

+0
-61
lines changed

src/solvers/lowering/flatten_byte_extract_exceptions.h

Lines changed: 0 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -25,67 +25,6 @@ class flatten_byte_extract_exceptiont : public std::runtime_error
2525
}
2626
};
2727

28-
class non_const_array_sizet : public flatten_byte_extract_exceptiont
29-
{
30-
public:
31-
non_const_array_sizet(const typet &array_type, const exprt &max_bytes)
32-
: flatten_byte_extract_exceptiont("cannot unpack array of non-const size"),
33-
max_bytes(max_bytes),
34-
array_type(array_type)
35-
{
36-
std::ostringstream error_message;
37-
error_message << runtime_error::what() << "\n";
38-
error_message << "array_type: " << array_type.pretty();
39-
error_message << "\nmax_bytes: " << max_bytes.pretty();
40-
computed_error_message = error_message.str();
41-
}
42-
43-
const char *what() const optional_noexcept override
44-
{
45-
return computed_error_message.c_str();
46-
}
47-
48-
private:
49-
exprt max_bytes;
50-
typet array_type;
51-
52-
std::string computed_error_message;
53-
};
54-
55-
class non_byte_alignedt : public flatten_byte_extract_exceptiont
56-
{
57-
public:
58-
non_byte_alignedt(
59-
const struct_typet &struct_type,
60-
const struct_union_typet::componentt &component,
61-
const mp_integer &byte_width)
62-
: flatten_byte_extract_exceptiont(
63-
"cannot unpack struct with non-byte aligned components"),
64-
struct_type(struct_type),
65-
component(component),
66-
byte_width(byte_width)
67-
{
68-
std::ostringstream error_message;
69-
error_message << runtime_error::what() << "\n";
70-
error_message << "width: " << byte_width << "\n";
71-
error_message << "component:" << component.get_name() << "\n";
72-
error_message << "struct_type: " << struct_type.pretty();
73-
computed_error_message = error_message.str();
74-
}
75-
76-
const char *what() const optional_noexcept override
77-
{
78-
return computed_error_message.c_str();
79-
}
80-
81-
private:
82-
const struct_typet struct_type;
83-
const struct_union_typet::componentt component;
84-
const mp_integer byte_width;
85-
86-
std::string computed_error_message;
87-
};
88-
8928
class non_constant_widtht : public flatten_byte_extract_exceptiont
9029
{
9130
public:

0 commit comments

Comments
 (0)