Skip to content

Commit 575ff4a

Browse files
author
Daniel Kroening
authored
Merge pull request diffblue#2893 from diffblue/goto-ckeck-bv-analysis
only do bitvector analysis when used
2 parents 3f5847c + a224e94 commit 575ff4a

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/analyses/goto_check.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ Author: Daniel Kroening, [email protected]
2222
#include <util/find_symbols.h>
2323
#include <util/guard.h>
2424
#include <util/ieee_float.h>
25+
#include <util/make_unique.h>
2526
#include <util/options.h>
2627
#include <util/pointer_offset_size.h>
2728
#include <util/pointer_predicates.h>
@@ -78,7 +79,7 @@ class goto_checkt
7879

7980
protected:
8081
const namespacet &ns;
81-
local_bitvector_analysist *local_bitvector_analysis;
82+
std::unique_ptr<local_bitvector_analysist> local_bitvector_analysis;
8283
goto_programt::const_targett t;
8384

8485
void check_rec(
@@ -1530,8 +1531,9 @@ void goto_checkt::goto_check(
15301531

15311532
bool did_something = false;
15321533

1533-
local_bitvector_analysist local_bitvector_analysis_obj(goto_function);
1534-
local_bitvector_analysis=&local_bitvector_analysis_obj;
1534+
if(enable_pointer_check)
1535+
local_bitvector_analysis =
1536+
util_make_unique<local_bitvector_analysist>(goto_function);
15351537

15361538
goto_programt &goto_program=goto_function.body;
15371539

0 commit comments

Comments
 (0)