Skip to content

Commit 1efed70

Browse files
authored
Merge pull request #7566 from diffblue/goto_program_deprecated
remove three deprecated goto_instructiont methods
2 parents 796fb38 + 3e8e07a commit 1efed70

File tree

5 files changed

+5
-34
lines changed

5 files changed

+5
-34
lines changed

src/cprover/cprover_parse_options.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ static void show_goto_functions(const goto_modelt &goto_model)
6262
std::cout << "^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n";
6363

6464
std::cout << symbol.display_name() << " /* " << symbol.name << " */\n";
65-
fun->second.body.output(ns, symbol.name, std::cout);
65+
fun->second.body.output(std::cout);
6666
}
6767
}
6868
}

src/goto-instrument/cover_basic_blocks.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ void cover_basic_blockst::add_block_lines(
163163
}
164164
};
165165
add_location(instruction.source_location());
166-
instruction.get_code().visit_pre([&](const exprt &expr) {
166+
instruction.code().visit_pre([&](const exprt &expr) {
167167
const auto &location = expr.source_location();
168168
if(!location.get_function().empty())
169169
add_location(location);

src/goto-instrument/full_slicer.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ static bool implicit(goto_programt::const_targett target)
235235
{
236236
// some variables are used during symbolic execution only
237237

238-
const irep_idt &statement = target->get_code().get_statement();
238+
const irep_idt &statement = target->code().get_statement();
239239
if(statement==ID_array_copy)
240240
return true;
241241

src/goto-instrument/goto_program2code.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -1964,8 +1964,8 @@ void goto_program2codet::copy_source_location(
19641964
goto_programt::const_targett src,
19651965
codet &dst)
19661966
{
1967-
if(src->get_code().source_location().is_not_nil())
1968-
dst.add_source_location() = src->get_code().source_location();
1967+
if(src->code().source_location().is_not_nil())
1968+
dst.add_source_location() = src->code().source_location();
19691969
else if(src->source_location().is_not_nil())
19701970
dst.add_source_location() = src->source_location();
19711971
}

src/goto-programs/goto_program.h

-29
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ Author: Daniel Kroening, [email protected]
1919
#include <limits>
2020
#include <string>
2121

22-
#include <util/deprecate.h>
2322
#include <util/invariant.h>
2423
#include <util/source_location.h>
2524

@@ -184,13 +183,6 @@ class goto_programt
184183
goto_instruction_codet _code;
185184

186185
public:
187-
/// Get the code represented by this instruction
188-
DEPRECATED(SINCE(2021, 10, 12, "Use code() instead"))
189-
const goto_instruction_codet &get_code() const
190-
{
191-
return _code;
192-
}
193-
194186
/// Get the code represented by this instruction
195187
const goto_instruction_codet &code() const
196188
{
@@ -734,30 +726,9 @@ class goto_programt
734726
return add(instructiont(type));
735727
}
736728

737-
/// Output goto program to given stream
738-
DEPRECATED(SINCE(2022, 5, 29, "Use output(out) instead"))
739-
std::ostream &output(
740-
const namespacet &ns,
741-
const irep_idt &identifier,
742-
std::ostream &out) const
743-
{
744-
return output(out);
745-
}
746-
747729
/// Output goto-program to given stream
748730
std::ostream &output(std::ostream &out) const;
749731

750-
/// Output a single instruction
751-
DEPRECATED(SINCE(2022, 5, 29, "Use instruction.output(out) instead"))
752-
std::ostream &output_instruction(
753-
const namespacet &ns,
754-
const irep_idt &identifier,
755-
std::ostream &out,
756-
const instructionst::value_type &instruction) const
757-
{
758-
return instruction.output(out);
759-
}
760-
761732
/// Compute the target numbers
762733
void compute_target_numbers();
763734

0 commit comments

Comments
 (0)