summaryrefslogtreecommitdiff
path: root/lib/Analysis/DomPrinter.cpp
diff options
context:
space:
mode:
authorTobias Grosser <grosser@fim.uni-passau.de>2009-11-30 12:38:47 +0000
committerTobias Grosser <grosser@fim.uni-passau.de>2009-11-30 12:38:47 +0000
commit56f4ef3232850e29c4635d0923910acce8887bd0 (patch)
tree904086d0665c9d480a8f0f3b1da2d78330406567 /lib/Analysis/DomPrinter.cpp
parenta10d598602308549d87d2c5d9848f5a72fda2b43 (diff)
downloadllvm-56f4ef3232850e29c4635d0923910acce8887bd0.tar.gz
llvm-56f4ef3232850e29c4635d0923910acce8887bd0.tar.bz2
llvm-56f4ef3232850e29c4635d0923910acce8887bd0.tar.xz
Remove ShortNames from getNodeLabel in DOTGraphTraits
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90134 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/DomPrinter.cpp')
-rw-r--r--lib/Analysis/DomPrinter.cpp31
1 files changed, 15 insertions, 16 deletions
diff --git a/lib/Analysis/DomPrinter.cpp b/lib/Analysis/DomPrinter.cpp
index 762cd9f6bc..32b8994f02 100644
--- a/lib/Analysis/DomPrinter.cpp
+++ b/lib/Analysis/DomPrinter.cpp
@@ -31,18 +31,23 @@ namespace llvm {
template<>
struct DOTGraphTraits<DomTreeNode*> : public DefaultDOTGraphTraits {
- DOTGraphTraits (bool isSimple=false) : DefaultDOTGraphTraits(isSimple) {}
+ DOTGraphTraits (bool isSimple=false)
+ : DefaultDOTGraphTraits(isSimple) {}
- static std::string getNodeLabel(DomTreeNode *Node, DomTreeNode *Graph,
- bool ShortNames) {
+ std::string getNodeLabel(DomTreeNode *Node, DomTreeNode *Graph) {
BasicBlock *BB = Node->getBlock();
if (!BB)
return "Post dominance root node";
- return DOTGraphTraits<const Function*>::getNodeLabel(BB, BB->getParent(),
- ShortNames);
+
+ if (isSimple())
+ return DOTGraphTraits<const Function*>
+ ::getSimpleNodeLabel(BB, BB->getParent());
+ else
+ return DOTGraphTraits<const Function*>
+ ::getCompleteNodeLabel(BB, BB->getParent());
}
};
@@ -56,11 +61,8 @@ struct DOTGraphTraits<DominatorTree*> : public DOTGraphTraits<DomTreeNode*> {
return "Dominator tree";
}
- static std::string getNodeLabel(DomTreeNode *Node,
- DominatorTree *G,
- bool ShortNames) {
- return DOTGraphTraits<DomTreeNode*>::getNodeLabel(Node, G->getRootNode(),
- ShortNames);
+ std::string getNodeLabel(DomTreeNode *Node, DominatorTree *G) {
+ return DOTGraphTraits<DomTreeNode*>::getNodeLabel(Node, G->getRootNode());
}
};
@@ -74,12 +76,9 @@ struct DOTGraphTraits<PostDominatorTree*>
static std::string getGraphName(PostDominatorTree *DT) {
return "Post dominator tree";
}
- static std::string getNodeLabel(DomTreeNode *Node,
- PostDominatorTree *G,
- bool ShortNames) {
- return DOTGraphTraits<DomTreeNode*>::getNodeLabel(Node,
- G->getRootNode(),
- ShortNames);
+
+ std::string getNodeLabel(DomTreeNode *Node, PostDominatorTree *G ) {
+ return DOTGraphTraits<DomTreeNode*>::getNodeLabel(Node, G->getRootNode());
}
};
}