We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c1bfa90 commit 8f0a78dCopy full SHA for 8f0a78d
src/goto-programs/goto_program.h
@@ -529,6 +529,23 @@ class goto_programt
529
return t;
530
}
531
532
+ optionalt<const_targett> get_target(const unsigned location_number) const
533
+ {
534
+ PRECONDITION(!instructions.empty());
535
+
536
+ const unsigned start_location_number = instructions.front().location_number;
537
538
+ if(
539
+ location_number < start_location_number ||
540
+ location_number > instructions.back().location_number)
541
542
+ return nullopt;
543
+ }
544
545
+ return std::next(
546
+ instructions.begin(), location_number - start_location_number);
547
548
549
template <typename Target>
550
std::list<Target> get_successors(Target target) const;
551
0 commit comments