@@ -959,26 +959,52 @@ class goto_programt
959
959
{_target});
960
960
}
961
961
962
+ // / Create an assignment instruction
962
963
static instructiont make_assignment (
963
964
const code_assignt &_code,
964
965
const source_locationt &l = source_locationt::nil())
965
966
{
966
967
return instructiont (_code, l, ASSIGN, nil_exprt (), {});
967
968
}
968
969
970
+ // / Create an assignment instruction
971
+ static instructiont make_assignment (
972
+ exprt lhs,
973
+ exprt rhs,
974
+ const source_locationt &l = source_locationt::nil())
975
+ {
976
+ return instructiont (
977
+ code_assignt (std::move (lhs), std::move (rhs)), l, ASSIGN, nil_exprt (), {});
978
+ }
979
+
969
980
static instructiont make_decl (
970
981
const code_declt &_code,
971
982
const source_locationt &l = source_locationt::nil())
972
983
{
973
984
return instructiont (_code, l, DECL, nil_exprt (), {});
974
985
}
975
986
987
+ // / Create a function call instruction
976
988
static instructiont make_function_call (
977
989
const code_function_callt &_code,
978
990
const source_locationt &l = source_locationt::nil())
979
991
{
980
992
return instructiont (_code, l, FUNCTION_CALL, nil_exprt (), {});
981
993
}
994
+
995
+ // / Create a function call instruction
996
+ static instructiont make_function_call (
997
+ exprt function,
998
+ code_function_callt::argumentst arguments,
999
+ const source_locationt &l = source_locationt::nil())
1000
+ {
1001
+ return instructiont (
1002
+ code_function_callt (std::move (function), std::move (arguments)),
1003
+ l,
1004
+ FUNCTION_CALL,
1005
+ nil_exprt (),
1006
+ {});
1007
+ }
982
1008
};
983
1009
984
1010
// / Get control-flow successors of a given instruction. The instruction is
0 commit comments