15
15
#include < deque>
16
16
#include < unordered_set>
17
17
18
- #include < util/base_type.h>
19
18
#include < util/find_symbols.h>
20
19
#include < util/mathematical_types.h>
21
20
#include < util/pointer_offset_size.h>
@@ -140,8 +139,7 @@ void linkingt::detailed_conflict_report_rec(
140
139
else if (t1.id ()==ID_pointer ||
141
140
t1.id ()==ID_array)
142
141
{
143
- if (depth>0 &&
144
- !base_type_eq (t1.subtype (), t2.subtype (), ns))
142
+ if (depth>0 && t1.subtype () != t2.subtype ())
145
143
{
146
144
if (conflict_path.type ().id () == ID_pointer)
147
145
conflict_path = dereference_exprt (conflict_path);
@@ -190,7 +188,7 @@ void linkingt::detailed_conflict_report_rec(
190
188
msg+=id2string (components2[i].get_name ())+' )' ;
191
189
break ;
192
190
}
193
- else if (! base_type_eq ( subtype1, subtype2, ns) )
191
+ else if (subtype1 != subtype2 )
194
192
{
195
193
typedef std::unordered_set<typet, irep_hash> type_sett;
196
194
type_sett parent_types;
@@ -307,7 +305,7 @@ void linkingt::detailed_conflict_report_rec(
307
305
msg+=std::to_string (parameters1.size ())+' /' ;
308
306
msg+=std::to_string (parameters2.size ())+' )' ;
309
307
}
310
- else if (! base_type_eq ( return_type1, return_type2, ns) )
308
+ else if (return_type1 != return_type2 )
311
309
{
312
310
conflict_path=
313
311
index_exprt (conflict_path,
@@ -331,7 +329,7 @@ void linkingt::detailed_conflict_report_rec(
331
329
const typet &subtype1=parameters1[i].type ();
332
330
const typet &subtype2=parameters2[i].type ();
333
331
334
- if (! base_type_eq ( subtype1, subtype2, ns) )
332
+ if (subtype1 != subtype2 )
335
333
{
336
334
conflict_path=
337
335
index_exprt (conflict_path,
@@ -450,7 +448,7 @@ void linkingt::duplicate_code_symbol(
450
448
symbolt &new_symbol)
451
449
{
452
450
// Both are functions.
453
- if (! base_type_eq ( old_symbol.type , new_symbol.type , ns) )
451
+ if (old_symbol.type != new_symbol.type )
454
452
{
455
453
const code_typet &old_t =to_code_type (old_symbol.type );
456
454
const code_typet &new_t =to_code_type (new_symbol.type );
@@ -461,7 +459,7 @@ void linkingt::duplicate_code_symbol(
461
459
// casts we need to fail hard
462
460
if (old_symbol.type .get_bool (ID_C_incomplete) && old_symbol.value .is_nil ())
463
461
{
464
- if (base_type_eq ( old_t .return_type (), new_t .return_type (), ns ))
462
+ if (old_t .return_type () == new_t .return_type ())
465
463
link_warning (
466
464
old_symbol,
467
465
new_symbol,
@@ -479,7 +477,7 @@ void linkingt::duplicate_code_symbol(
479
477
else if (
480
478
new_symbol.type .get_bool (ID_C_incomplete) && new_symbol.value .is_nil ())
481
479
{
482
- if (base_type_eq ( old_t .return_type (), new_t .return_type (), ns ))
480
+ if (old_t .return_type () == new_t .return_type ())
483
481
link_warning (
484
482
old_symbol,
485
483
new_symbol,
@@ -491,7 +489,7 @@ void linkingt::duplicate_code_symbol(
491
489
" implicit function declaration" );
492
490
}
493
491
// handle (incomplete) function prototypes
494
- else if (base_type_eq ( old_t .return_type (), new_t .return_type (), ns ) &&
492
+ else if (old_t .return_type () == new_t .return_type () &&
495
493
((old_t .parameters ().empty () &&
496
494
old_t .has_ellipsis () &&
497
495
old_symbol.value .is_nil ()) ||
@@ -547,7 +545,7 @@ void linkingt::duplicate_code_symbol(
547
545
}
548
546
// conflicting declarations without a definition, matching return
549
547
// types
550
- else if (base_type_eq ( old_t .return_type (), new_t .return_type (), ns ) &&
548
+ else if (old_t .return_type () == new_t .return_type () &&
551
549
old_symbol.value .is_nil () &&
552
550
new_symbol.value .is_nil ())
553
551
{
@@ -588,7 +586,7 @@ void linkingt::duplicate_code_symbol(
588
586
typedef std::deque<std::pair<typet, typet> > conflictst;
589
587
conflictst conflicts;
590
588
591
- if (! base_type_eq ( old_t .return_type (), new_t .return_type (), ns ))
589
+ if (old_t .return_type () != new_t .return_type ())
592
590
conflicts.push_back (
593
591
std::make_pair (old_t .return_type (), new_t .return_type ()));
594
592
@@ -600,7 +598,7 @@ void linkingt::duplicate_code_symbol(
600
598
n_it!=new_t .parameters ().end ();
601
599
++o_it, ++n_it)
602
600
{
603
- if (! base_type_eq ( o_it->type (), n_it->type (), ns ))
601
+ if (o_it->type () != n_it->type ())
604
602
conflicts.push_back (
605
603
std::make_pair (o_it->type (), n_it->type ()));
606
604
}
@@ -693,7 +691,7 @@ void linkingt::duplicate_code_symbol(
693
691
694
692
bool found=false ;
695
693
for (const auto &c : union_type.components ())
696
- if (base_type_eq ( c.type (), src_type, ns) )
694
+ if (c.type () == src_type )
697
695
{
698
696
found=true ;
699
697
if (warn_msg.empty ())
@@ -768,7 +766,7 @@ void linkingt::duplicate_code_symbol(
768
766
{
769
767
// ok, silently ignore
770
768
}
771
- else if (base_type_eq ( old_symbol.type , new_symbol.type , ns) )
769
+ else if (old_symbol.type == new_symbol.type )
772
770
{
773
771
// keep the one in old_symbol -- libraries come last!
774
772
warning ().source_location =new_symbol.location ;
@@ -791,7 +789,7 @@ bool linkingt::adjust_object_type_rec(
791
789
const typet &t2,
792
790
adjust_type_infot &info)
793
791
{
794
- if (base_type_eq (t1, t2, ns) )
792
+ if (t1 == t2 )
795
793
return false ;
796
794
797
795
if (
@@ -987,7 +985,7 @@ void linkingt::duplicate_object_symbol(
987
985
// both are variables
988
986
bool set_to_new = false ;
989
987
990
- if (! base_type_eq ( old_symbol.type , new_symbol.type , ns) )
988
+ if (old_symbol.type != new_symbol.type )
991
989
{
992
990
bool failed=
993
991
adjust_object_type (old_symbol, new_symbol, set_to_new);
@@ -1045,7 +1043,7 @@ void linkingt::duplicate_object_symbol(
1045
1043
simplify (tmp_old, ns);
1046
1044
simplify (tmp_new, ns);
1047
1045
1048
- if (base_type_eq ( tmp_old, tmp_new, ns) )
1046
+ if (tmp_old == tmp_new )
1049
1047
{
1050
1048
// ok, the same
1051
1049
}
@@ -1172,7 +1170,7 @@ void linkingt::duplicate_type_symbol(
1172
1170
1173
1171
if (old_symbol.type .id ()==ID_array &&
1174
1172
new_symbol.type .id ()==ID_array &&
1175
- base_type_eq ( old_symbol.type .subtype (), new_symbol.type .subtype (), ns ))
1173
+ old_symbol.type .subtype () == new_symbol.type .subtype ())
1176
1174
{
1177
1175
if (to_array_type (old_symbol.type ).size ().is_nil () &&
1178
1176
to_array_type (new_symbol.type ).size ().is_not_nil ())
@@ -1244,7 +1242,7 @@ bool linkingt::needs_renaming_type(
1244
1242
1245
1243
if (old_symbol.type .id ()==ID_array &&
1246
1244
new_symbol.type .id ()==ID_array &&
1247
- base_type_eq ( old_symbol.type .subtype (), new_symbol.type .subtype (), ns ))
1245
+ old_symbol.type .subtype () == new_symbol.type .subtype ())
1248
1246
{
1249
1247
if (to_array_type (old_symbol.type ).size ().is_nil () &&
1250
1248
to_array_type (new_symbol.type ).size ().is_not_nil ())
0 commit comments