@@ -60,12 +60,10 @@ void symbolt::show(std::ostream &out) const
60
60
out << " volatile" ;
61
61
if (!mode.empty ())
62
62
out << " mode=" << mode;
63
- if (!base_name.empty ())
64
- out << " base_name=" << base_name;
65
63
if (!module.empty ())
66
64
out << " module=" << module;
67
- if (!pretty_name .empty ())
68
- out << " pretty_name =" << pretty_name ;
65
+ if (!display_name .empty ())
66
+ out << " display_name =" << display_name ;
69
67
out << ' \n ' ;
70
68
out << " location: " << location << ' \n ' ;
71
69
@@ -92,9 +90,8 @@ void symbolt::swap(symbolt &b)
92
90
SYM_SWAP1 (type);
93
91
SYM_SWAP1 (value);
94
92
SYM_SWAP1 (name);
95
- SYM_SWAP1 (pretty_name );
93
+ SYM_SWAP1 (display_name );
96
94
SYM_SWAP1 (module);
97
- SYM_SWAP1 (base_name);
98
95
SYM_SWAP1 (mode);
99
96
SYM_SWAP1 (location);
100
97
@@ -142,10 +139,7 @@ bool symbolt::is_well_formed() const
142
139
// to have it's base name as a suffix to it's more
143
140
// general name.
144
141
145
- // Exception: Java symbols' base names do not have type signatures
146
- // (for example, they can have name "someclass.method:(II)V" and base name
147
- // "method")
148
- if (!has_suffix (id2string (name), id2string (base_name)) && mode != ID_java)
142
+ if (!has_suffix (id2string (name), id2string (display_name)))
149
143
{
150
144
bool criterion_must_hold = true ;
151
145
@@ -168,6 +162,13 @@ bool symbolt::is_well_formed() const
168
162
criterion_must_hold = false ;
169
163
}
170
164
}
165
+ // Exception: Java symbols' base names do not have type signatures
166
+ // (for example, they can have name "someclass.method:(II)V" and base name
167
+ // "method")
168
+ else if (mode == ID_java)
169
+ {
170
+ return id2string (name).find (id2string (display_name)) != std::string::npos;
171
+ }
171
172
172
173
// Linker renaming may have added $linkN suffixes to the name, and other
173
174
// suffixes such as #return_value may have then be subsequently added.
@@ -210,9 +211,8 @@ bool symbolt::operator==(const symbolt &other) const
210
211
location == other.location &&
211
212
name == other.name &&
212
213
module == other.module &&
213
- base_name == other.base_name &&
214
214
mode == other.mode &&
215
- pretty_name == other.pretty_name &&
215
+ display_name == other.display_name &&
216
216
is_type == other.is_type &&
217
217
is_macro == other.is_macro &&
218
218
is_exported == other.is_exported &&
0 commit comments