about summary refs log tree commit diff homepage
path: root/lib/Core/MergeHandler.cpp
diff options
context:
space:
mode:
authorMartin Nowack <m.nowack@imperial.ac.uk>2019-04-03 16:01:36 +0100
committerCristian Cadar <c.cadar@imperial.ac.uk>2020-02-19 12:05:22 +0000
commit288e3110e5df232ab471db705371d818605b4ae4 (patch)
tree0d36b9dc49581b9b335cc962f0896c13e2756993 /lib/Core/MergeHandler.cpp
parentb723470d00f80ad5620b27e81f2afa9efdd95135 (diff)
downloadklee-288e3110e5df232ab471db705371d818605b4ae4.tar.gz
Add `ReferenceCounter` struct utilized by ref<>
Using KLEE's `ref<>` shared ptr requires the referenced object
to contain a reference counter to be added and initialised to 0
as part of the constructor.

To support better reuse of the `ref<>` ptr add a `ReferenceCounter`
struct.

Just adding this struct to a new class/struct as member enables
reference counting with `ref<>` - no additional counter management
needed.
Diffstat (limited to 'lib/Core/MergeHandler.cpp')
-rw-r--r--lib/Core/MergeHandler.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Core/MergeHandler.cpp b/lib/Core/MergeHandler.cpp
index 5764b5a1..7a683e84 100644
--- a/lib/Core/MergeHandler.cpp
+++ b/lib/Core/MergeHandler.cpp
@@ -135,8 +135,8 @@ bool MergeHandler::hasMergedStates() {
 
 MergeHandler::MergeHandler(Executor *_executor, ExecutionState *es)
     : executor(_executor), openInstruction(es->steppedInstructions),
-      closedMean(0), closedStateCount(0), refCount(0) {
-  executor->mergingSearcher->mergeGroups.push_back(this);
+      closedMean(0), closedStateCount(0) {
+    executor->mergingSearcher->mergeGroups.push_back(this);
   addOpenState(es);
 }