#include "llvm/ADT/OwningPtr.h"
#include "llvm/ADT/GraphTraits.h"
#include "llvm/ADT/DepthFirstIterator.h"
-#include <vector>
namespace clang {
friend class GREngineImpl;
// Type definitions.
- typedef llvm::DenseMap<ProgramPoint,void*> EdgeNodeSetMap;
+ typedef llvm::DenseMap<ProgramPoint,void*> EdgeNodeSetMap;
typedef llvm::SmallVector<ExplodedNodeImpl*,2> RootsTy;
typedef llvm::SmallVector<ExplodedNodeImpl*,10> EndNodesTy;
}
public:
- virtual ~ExplodedGraphImpl() {};
+ virtual ~ExplodedGraphImpl();
unsigned num_roots() const { return Roots.size(); }
unsigned num_eops() const { return EndNodes.size(); }
// Delete the FoldingSet's in Nodes. Note that the contents
// of the FoldingSets are nodes allocated from the BumpPtrAllocator,
// so all of those will get nuked when that object is destroyed.
- for (EdgeNodeSetMap::iterator I=Nodes.begin(), E=Nodes.end(); I!=E; ++I)
- delete reinterpret_cast<llvm::FoldingSet<NodeTy>*>(I->second);
+ for (EdgeNodeSetMap::iterator I=Nodes.begin(), E=Nodes.end(); I!=E; ++I) {
+ llvm::FoldingSet<NodeTy>* ENodes =
+ reinterpret_cast<llvm::FoldingSet<NodeTy>*>(I->second);
+
+ for (typename llvm::FoldingSet<NodeTy>::iterator
+ I=ENodes->begin(), E=ENodes->end(); I!=E; ++I)
+ delete *I;
+
+ delete ENodes;
+ }
}
/// getCheckerState - Returns the internal checker state associated