mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-17 21:29:20 +00:00
If an edge points to a field of another memory object, actually reflect this
in the DOT visualization of the DSGraphs. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14316 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
60f5cf42e9
commit
8e667cdc94
@ -100,6 +100,24 @@ struct DOTGraphTraits<const DSGraph*> : public DefaultDOTGraphTraits {
|
|||||||
static std::string getNodeAttributes(const DSNode *N) {
|
static std::string getNodeAttributes(const DSNode *N) {
|
||||||
return "shape=Mrecord";
|
return "shape=Mrecord";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static bool edgeTargetsEdgeSource(const void *Node,
|
||||||
|
DSNode::const_iterator I) {
|
||||||
|
unsigned O = I.getNode()->getLink(I.getOffset()).getOffset();
|
||||||
|
return (O >> DS::PointerShift) != 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static DSNode::const_iterator getEdgeTarget(const DSNode *Node,
|
||||||
|
DSNode::const_iterator I) {
|
||||||
|
unsigned O = I.getNode()->getLink(I.getOffset()).getOffset();
|
||||||
|
unsigned LinkNo = O >> DS::PointerShift;
|
||||||
|
const DSNode *N = *I;
|
||||||
|
DSNode::const_iterator R = N->begin();
|
||||||
|
for (; LinkNo; --LinkNo)
|
||||||
|
++R;
|
||||||
|
return R;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/// addCustomGraphFeatures - Use this graph writing hook to emit call nodes
|
/// addCustomGraphFeatures - Use this graph writing hook to emit call nodes
|
||||||
/// and the return node.
|
/// and the return node.
|
||||||
|
Loading…
Reference in New Issue
Block a user