@@ -40,15 +40,13 @@ bool casting_replace_symbolt::replace_symbol_expr(symbol_exprt &s) const
40
40
}
41
41
42
42
std::string linkingt::expr_to_string (
43
- const namespacet &ns,
44
43
const irep_idt &identifier,
45
44
const exprt &expr) const
46
45
{
47
46
return from_expr (ns, identifier, expr);
48
47
}
49
48
50
49
std::string linkingt::type_to_string (
51
- const namespacet &ns,
52
50
const irep_idt &identifier,
53
51
const typet &type) const
54
52
{
@@ -72,7 +70,6 @@ static const typet &follow_tags_symbols(
72
70
}
73
71
74
72
std::string linkingt::type_to_string_verbose (
75
- const namespacet &ns,
76
73
const symbolt &symbol,
77
74
const typet &type) const
78
75
{
@@ -91,7 +88,7 @@ std::string linkingt::type_to_string_verbose(
91
88
{
92
89
const typet &subtype = c.type ();
93
90
result+=" " ;
94
- result+= type_to_string (ns, symbol.name , subtype);
91
+ result += type_to_string (symbol.name , subtype);
95
92
result+=' ' ;
96
93
97
94
if (!c.get_base_name ().empty ())
@@ -108,15 +105,15 @@ std::string linkingt::type_to_string_verbose(
108
105
}
109
106
else if (followed.id ()==ID_pointer)
110
107
{
111
- return type_to_string_verbose (ns, symbol, followed.subtype ())+ " *" ;
108
+ return type_to_string_verbose (symbol, followed.subtype ()) + " *" ;
112
109
}
113
110
else if (followed.id ()==ID_incomplete_struct ||
114
111
followed.id ()==ID_incomplete_union)
115
112
{
116
- return type_to_string (ns, symbol.name , type)+ " (incomplete)" ;
113
+ return type_to_string (symbol.name , type) + " (incomplete)" ;
117
114
}
118
115
119
- return type_to_string (ns, symbol.name , type);
116
+ return type_to_string (symbol.name , type);
120
117
}
121
118
122
119
void linkingt::detailed_conflict_report_rec (
@@ -256,8 +253,8 @@ void linkingt::detailed_conflict_report_rec(
256
253
if (t1.subtype ()!=t2.subtype ())
257
254
{
258
255
msg=" enum value types are different (" ;
259
- msg+= type_to_string (ns, old_symbol.name , t1.subtype ())+ ' /' ;
260
- msg+= type_to_string (ns, new_symbol.name , t2.subtype ())+ ' )' ;
256
+ msg += type_to_string (old_symbol.name , t1.subtype ()) + ' /' ;
257
+ msg += type_to_string (new_symbol.name , t2.subtype ()) + ' )' ;
261
258
}
262
259
else if (members1.size ()!=members2.size ())
263
260
{
@@ -359,13 +356,12 @@ void linkingt::detailed_conflict_report_rec(
359
356
if (!msg.empty ())
360
357
{
361
358
error () << ' \n ' ;
362
- error () << " reason for conflict at "
363
- << expr_to_string (ns, " " , conflict_path)
359
+ error () << " reason for conflict at " << expr_to_string (" " , conflict_path)
364
360
<< " : " << msg << ' \n ' ;
365
361
366
362
error () << ' \n ' ;
367
- error () << type_to_string_verbose (ns, old_symbol, t1) << ' \n ' ;
368
- error () << type_to_string_verbose (ns, new_symbol, t2) << ' \n ' ;
363
+ error () << type_to_string_verbose (old_symbol, t1) << ' \n ' ;
364
+ error () << type_to_string_verbose (new_symbol, t2) << ' \n ' ;
369
365
}
370
366
371
367
#ifdef DEBUG
@@ -383,12 +379,12 @@ void linkingt::link_error(
383
379
error () << " error: " << msg << " `"
384
380
<< old_symbol.display_name ()
385
381
<< " '" << ' \n ' ;
386
- error () << " old definition in module `" << old_symbol.module
387
- << " ' " << old_symbol.location << ' \n '
388
- << type_to_string_verbose (ns, old_symbol) << ' \n ' ;
389
- error () << " new definition in module `" << new_symbol.module
390
- << " ' " << new_symbol.location << ' \n '
391
- << type_to_string_verbose (ns, new_symbol) << eom;
382
+ error () << " old definition in module `" << old_symbol.module << " ' "
383
+ << old_symbol.location << ' \n '
384
+ << type_to_string_verbose (old_symbol) << ' \n ' ;
385
+ error () << " new definition in module `" << new_symbol.module << " ' "
386
+ << new_symbol.location << ' \n '
387
+ << type_to_string_verbose (new_symbol) << eom;
392
388
}
393
389
394
390
void linkingt::link_warning (
@@ -401,12 +397,12 @@ void linkingt::link_warning(
401
397
warning () << " warning: " << msg << " \" "
402
398
<< old_symbol.display_name ()
403
399
<< " \" " << ' \n ' ;
404
- warning () << " old definition in module " << old_symbol.module
405
- << " " << old_symbol.location << ' \n '
406
- << type_to_string_verbose (ns, old_symbol) << ' \n ' ;
407
- warning () << " new definition in module " << new_symbol.module
408
- << " " << new_symbol.location << ' \n '
409
- << type_to_string_verbose (ns, new_symbol) << eom;
400
+ warning () << " old definition in module " << old_symbol.module << " "
401
+ << old_symbol.location << ' \n '
402
+ << type_to_string_verbose (old_symbol) << ' \n ' ;
403
+ warning () << " new definition in module " << new_symbol.module << " "
404
+ << new_symbol.location << ' \n '
405
+ << type_to_string_verbose (new_symbol) << eom;
410
406
}
411
407
412
408
irep_idt linkingt::rename (const irep_idt id)
@@ -1040,16 +1036,12 @@ void linkingt::duplicate_object_symbol(
1040
1036
1041
1037
warning () << " warning: conflicting initializers for"
1042
1038
<< " variable \" " << old_symbol.name << " \"\n " ;
1043
- warning () << " using old value in module "
1044
- << old_symbol.module << " "
1039
+ warning () << " using old value in module " << old_symbol.module << " "
1045
1040
<< old_symbol.value .find_source_location () << ' \n '
1046
- << expr_to_string (ns, old_symbol.name , tmp_old)
1047
- << ' \n ' ;
1048
- warning () << " ignoring new value in module "
1049
- << new_symbol.module << " "
1041
+ << expr_to_string (old_symbol.name , tmp_old) << ' \n ' ;
1042
+ warning () << " ignoring new value in module " << new_symbol.module << " "
1050
1043
<< new_symbol.value .find_source_location () << ' \n '
1051
- << expr_to_string (ns, new_symbol.name , tmp_new)
1052
- << eom;
1044
+ << expr_to_string (new_symbol.name , tmp_new) << eom;
1053
1045
}
1054
1046
}
1055
1047
}
0 commit comments