Skip to content

Commit cae4f30

Browse files
author
Daniel Kroening
committed
only do bitvector analysis when used
1 parent c269ca5 commit cae4f30

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/analyses/goto_check.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ class goto_checkt
7878

7979
protected:
8080
const namespacet &ns;
81-
local_bitvector_analysist *local_bitvector_analysis;
81+
std::unique_ptr<local_bitvector_analysist> local_bitvector_analysis;
8282
goto_programt::const_targett t;
8383

8484
void check_rec(
@@ -1530,8 +1530,9 @@ void goto_checkt::goto_check(
15301530

15311531
bool did_something = false;
15321532

1533-
local_bitvector_analysist local_bitvector_analysis_obj(goto_function);
1534-
local_bitvector_analysis=&local_bitvector_analysis_obj;
1533+
if(enable_pointer_check)
1534+
local_bitvector_analysis = std::unique_ptr<local_bitvector_analysist>(
1535+
new local_bitvector_analysist(goto_function));
15351536

15361537
goto_programt &goto_program=goto_function.body;
15371538

0 commit comments

Comments
 (0)