Skip to content

Commit ef5e5ce

Browse files
committed
Use existing irep_idts instead of strings
1 parent 1bd9efd commit ef5e5ce

File tree

5 files changed

+13
-13
lines changed

5 files changed

+13
-13
lines changed

src/cpp/cpp_typecheck_resolve.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -839,11 +839,11 @@ exprt cpp_typecheck_resolvet::do_builtin(
839839
<< ": " << original_scope->prefix
840840
<< messaget::eom;
841841
}
842-
else if(base_name=="size_t")
842+
else if(base_name == ID_size_t)
843843
{
844844
dest=type_exprt(size_type());
845845
}
846-
else if(base_name=="ssize_t")
846+
else if(base_name == ID_ssize_t)
847847
{
848848
dest=type_exprt(signed_size_type());
849849
}

src/goto-programs/remove_asm.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ void remove_asmt::process_instruction(
195195
{
196196
gcc_asm_function_call("__asm_"+id2string(command), code, tmp_dest);
197197
}
198-
else if(command=="sync") // Power
198+
else if(command == ID_sync) // Power
199199
{
200200
goto_programt::targett t=tmp_dest.add_instruction(OTHER);
201201
t->source_location=code.source_location();
@@ -210,7 +210,7 @@ void remove_asmt::process_instruction(
210210
t->code.set(ID_RRcumul, true);
211211
t->code.set(ID_WRcumul, true);
212212
}
213-
else if(command=="lwsync") // Power
213+
else if(command == ID_lwsync) // Power
214214
{
215215
goto_programt::targett t=tmp_dest.add_instruction(OTHER);
216216
t->source_location=code.source_location();
@@ -223,7 +223,7 @@ void remove_asmt::process_instruction(
223223
t->code.set(ID_RWcumul, true);
224224
t->code.set(ID_RRcumul, true);
225225
}
226-
else if(command=="isync") // Power
226+
else if(command == ID_isync) // Power
227227
{
228228
goto_programt::targett t=tmp_dest.add_instruction(OTHER);
229229
t->source_location=code.source_location();

src/goto-symex/slice_by_trace.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ void symex_slice_by_tracet::compute_ts_back(
244244
!i->io_args.empty() &&
245245
i->io_args.front().id()=="trace_event")
246246
{
247-
irep_idt event=i->io_args.front().get("event");
247+
irep_idt event = i->io_args.front().get(ID_event);
248248

249249
if(!alphabet.empty())
250250
{

src/solvers/smt2/smt2_parser.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -774,7 +774,7 @@ exprt smt2_parsert::function_application()
774774
}
775775
else if(id=="rotate_left" ||
776776
id=="rotate_right" ||
777-
id=="repeat" ||
777+
id == ID_repeat ||
778778
id=="sign_extend" ||
779779
id=="zero_extend")
780780
{
@@ -826,7 +826,7 @@ exprt smt2_parsert::function_application()
826826

827827
return typecast_exprt(op[0], unsigned_type);
828828
}
829-
else if(id=="repeat")
829+
else if(id == ID_repeat)
830830
{
831831
return nil_exprt();
832832
}

src/util/symbol.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,9 @@ irept symbolt::to_irep() const
8888
dest.set(ID_pretty_name, pretty_name);
8989

9090
if(is_type)
91-
dest.set("is_type", true);
91+
dest.set(ID_is_type, true);
9292
if(is_macro)
93-
dest.set("is_macro", true);
93+
dest.set(ID_is_macro, true);
9494
if(is_exported)
9595
dest.set("is_exported", true);
9696
if(is_input)
@@ -100,11 +100,11 @@ irept symbolt::to_irep() const
100100
if(is_state_var)
101101
dest.set("is_statevar", true);
102102
if(is_parameter)
103-
dest.set("is_parameter", true);
103+
dest.set(ID_is_parameter, true);
104104
if(is_auxiliary)
105105
dest.set("is_auxiliary", true);
106106
if(is_weak)
107-
dest.set("is_weak", true);
107+
dest.set(ID_is_weak, true);
108108
if(is_property)
109109
dest.set("is_property", true);
110110
if(is_lvalue)
@@ -116,7 +116,7 @@ irept symbolt::to_irep() const
116116
if(is_file_local)
117117
dest.set("is_file_local", true);
118118
if(is_extern)
119-
dest.set("is_extern", true);
119+
dest.set(ID_is_extern, true);
120120
if(is_volatile)
121121
dest.set("is_volatile", true);
122122

0 commit comments

Comments
 (0)