From: weiyu Date: Sat, 5 Oct 2019 01:36:29 +0000 (-0700) Subject: Add default memory allocation and free functions for HSIterator and some other tiny... X-Git-Url: http://plrg.eecs.uci.edu/git/?p=c11tester.git;a=commitdiff_plain;h=291ac33e363ce8a7b39441c0fa5c8e44ff84cdc6;hp=0acd7ac85bd6004e53e1283a2900ffef7debeed8;ds=sidebyside Add default memory allocation and free functions for HSIterator and some other tiny stuff --- diff --git a/concretepredicate.cc b/concretepredicate.cc index 9633e6c7..79643bee 100644 --- a/concretepredicate.cc +++ b/concretepredicate.cc @@ -5,11 +5,6 @@ ConcretePredicate::ConcretePredicate(thread_id_t tid) : expressions() {} -ConcretePredicate::~ConcretePredicate() -{ - expressions.clear(); -} - void ConcretePredicate::add_expression(token_t token, uint64_t value, bool equality) { expressions.push_back(concrete_pred_expr(token, value, equality)); diff --git a/concretepredicate.h b/concretepredicate.h index f0eaeea9..c3b81bd9 100644 --- a/concretepredicate.h +++ b/concretepredicate.h @@ -9,7 +9,7 @@ class ConcretePredicate { public: ConcretePredicate(thread_id_t tid); - ~ConcretePredicate(); + ~ConcretePredicate() {} void add_expression(token_t token, uint64_t value, bool equality); SnapVector * getExpressions() { return &expressions; } diff --git a/funcnode.cc b/funcnode.cc index bf8971bd..18d7771b 100644 --- a/funcnode.cc +++ b/funcnode.cc @@ -640,6 +640,10 @@ void FuncNode::add_out_edge(FuncNode * other) } } +/* Compute the distance between this FuncNode and the target node. + * Return -1 if the target node is unreachable or the actual distance + * is greater than max_step. + */ int FuncNode::compute_distance(FuncNode * target, int max_step) { SnapList queue; diff --git a/hashset.h b/hashset.h index baf6d43e..d660620f 100644 --- a/hashset.h +++ b/hashset.h @@ -21,7 +21,7 @@ struct LinkNode { template class HashSet; -template, bool (*equals)(_Key, _Key) = default_equals<_Key> > +template, bool (*equals)(_Key, _Key) = default_equals<_Key> > class HSIterator { public: HSIterator(LinkNode<_Key> *_curr, HashSet <_Key, _KeyInt, _Shift, _malloc, _calloc, _free, hash_function, equals> * _set) :