diff options
author | Frank Busse <bb0xfb@gmail.com> | 2019-05-30 16:00:03 +0100 |
---|---|---|
committer | Cristian Cadar <c.cadar@imperial.ac.uk> | 2019-05-31 12:19:36 +0100 |
commit | ade2bf89486ae2e44571fb547dbc96488fc3dab4 (patch) | |
tree | 1c06431d9c297af2133de127420540c43cf6cd35 /lib/Core/PTree.cpp | |
parent | 31f965a01fbf7fd6e8590395de2f59d1b224607c (diff) | |
download | klee-ade2bf89486ae2e44571fb547dbc96488fc3dab4.tar.gz |
PTree: fix dump() method
Diffstat (limited to 'lib/Core/PTree.cpp')
-rw-r--r-- | lib/Core/PTree.cpp | 30 |
1 files changed, 6 insertions, 24 deletions
diff --git a/lib/Core/PTree.cpp b/lib/Core/PTree.cpp index 77698bb5..e3e38868 100644 --- a/lib/Core/PTree.cpp +++ b/lib/Core/PTree.cpp @@ -18,10 +18,7 @@ using namespace klee; /* *** */ -PTree::PTree(const data_type &_root) : root(new Node(0,_root)) { -} - -PTree::~PTree() {} +PTree::PTree(const data_type &root) : root(new Node(nullptr, root)) {} std::pair<PTreeNode*, PTreeNode*> PTree::split(Node *n, @@ -39,10 +36,10 @@ void PTree::remove(Node *n) { Node *p = n->parent; if (p) { if (n == p->left) { - p->left = 0; + p->left = nullptr; } else { assert(n == p->right); - p->right = 0; + p->right = nullptr; } } delete n; @@ -65,13 +62,7 @@ void PTree::dump(llvm::raw_ostream &os) { while (!stack.empty()) { PTree::Node *n = stack.back(); stack.pop_back(); - if (n->condition.isNull()) { - os << "\tn" << n << " [label=\"\""; - } else { - os << "\tn" << n << " [label=\""; - pp->print(n->condition); - os << "\",shape=diamond"; - } + os << "\tn" << n << " [shape=diamond"; if (n->data) os << ",fillcolor=green"; os << "];\n"; @@ -88,15 +79,6 @@ void PTree::dump(llvm::raw_ostream &os) { delete pp; } -PTreeNode::PTreeNode(PTreeNode *_parent, - ExecutionState *_data) - : parent(_parent), - left(0), - right(0), - data(_data), - condition(0) { -} - -PTreeNode::~PTreeNode() { -} +PTreeNode::PTreeNode(PTreeNode * parent, ExecutionState * data) + : parent{parent}, data{data} {} |