Skip to content

Commit b2e4ca0

Browse files
committed
Use existing irep_idts instead of strings
1 parent 2b819e6 commit b2e4ca0

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
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
}

0 commit comments

Comments
 (0)