about summary refs log tree commit diff homepage
path: root/lib/Core/Searcher.cpp
diff options
context:
space:
mode:
authorTimotej Kapus <tk1713@ic.ac.uk>2019-10-17 13:07:34 +0100
committerCristian Cadar <c.cadar@imperial.ac.uk>2020-06-29 22:24:53 +0100
commit1d357591bd80e7157d29009691d632eddff971f5 (patch)
treede1611f1ec12bf57904d16fb6e1585c843ee4c56 /lib/Core/Searcher.cpp
parent9c50be98c0b291bdde94cf870316569f8eab5917 (diff)
downloadklee-1d357591bd80e7157d29009691d632eddff971f5.tar.gz
[PTree] Replace left/right with PointerIntPair
Diffstat (limited to 'lib/Core/Searcher.cpp')
-rw-r--r--lib/Core/Searcher.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/Core/Searcher.cpp b/lib/Core/Searcher.cpp
index 0a1e6152..27a92b49 100644
--- a/lib/Core/Searcher.cpp
+++ b/lib/Core/Searcher.cpp
@@ -271,17 +271,17 @@ ExecutionState &RandomPathSearcher::selectState() {
   unsigned flips=0, bits=0;
   PTreeNode *n = executor.processTree->root;
   while (!n->state) {
-    if (!n->left) {
-      n = n->right;
-    } else if (!n->right) {
-      n = n->left;
+    if (!n->left.getPointer()) {
+      n = n->right.getPointer();
+    } else if (!n->right.getPointer()) {
+      n = n->left.getPointer();
     } else {
       if (bits==0) {
         flips = theRNG.getInt32();
         bits = 32;
       }
       --bits;
-      n = (flips&(1<<bits)) ? n->left : n->right;
+      n = (flips&(1<<bits)) ? n->left.getPointer() : n->right.getPointer();
     }
   }