return const_cast<ExplodedNode*>(this)->succ_end();
}
+ int64_t getID(ExplodedGraph *G) const;
+
private:
void replaceSuccessor(ExplodedNode *node) { Succs.replaceNode(node); }
void replacePredecessor(ExplodedNode *node) { Preds.replaceNode(node); }
return Storage.getAddrOfPtr1() + 1;
}
+int64_t ExplodedNode::getID(ExplodedGraph *G) const {
+ Optional<int64_t> Out = G->getAllocator().identifyObject(this);
+ assert(Out && "Wrong allocator used");
+ assert(*Out % alignof(ExplodedNode) == 0 && "Wrong alignment information");
+ return *Out / alignof(ExplodedNode);
+}
+
ExplodedNode *ExplodedGraph::getNode(const ProgramPoint &L,
ProgramStateRef State,
bool IsSink,
}
ProgramStateRef state = N->getState();
- Out << "\\|StateID: " << state->getID() << " ("
- << (const void*) state.get() << ")"
- << " NodeID: " << (const void*) N << "\\|";
+ ExplodedGraph &Graph =
+ static_cast<ExprEngine *>(state->getStateManager().getOwningEngine())
+ ->getGraph();
+
+ Out << "\\|StateID: " << state->getID() << " (" << (const void *)state.get()
+ << ")"
+ << " NodeID: " << N->getID(&Graph) << " (" << (const void *)N << ")\\|";
state->printDOT(Out, N->getLocationContext());