aboutsummaryrefslogtreecommitdiff
path: root/lib/Analysis/DomPrinter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Analysis/DomPrinter.cpp')
-rw-r--r--lib/Analysis/DomPrinter.cpp48
1 files changed, 38 insertions, 10 deletions
diff --git a/lib/Analysis/DomPrinter.cpp b/lib/Analysis/DomPrinter.cpp
index 0c880df54f8e..7acfb41500d4 100644
--- a/lib/Analysis/DomPrinter.cpp
+++ b/lib/Analysis/DomPrinter.cpp
@@ -111,20 +111,36 @@ struct DomOnlyViewer : public DOTGraphTraitsViewer<
}
};
-struct PostDomViewer
- : public DOTGraphTraitsViewer<PostDominatorTree, false> {
+struct PostDominatorTreeWrapperPassAnalysisGraphTraits {
+ static PostDominatorTree *getGraph(PostDominatorTreeWrapperPass *PDTWP) {
+ return &PDTWP->getPostDomTree();
+ }
+};
+
+struct PostDomViewer : public DOTGraphTraitsViewer<
+ PostDominatorTreeWrapperPass, false,
+ PostDominatorTree *,
+ PostDominatorTreeWrapperPassAnalysisGraphTraits> {
static char ID;
PostDomViewer() :
- DOTGraphTraitsViewer<PostDominatorTree, false>("postdom", ID){
+ DOTGraphTraitsViewer<PostDominatorTreeWrapperPass, false,
+ PostDominatorTree *,
+ PostDominatorTreeWrapperPassAnalysisGraphTraits>(
+ "postdom", ID){
initializePostDomViewerPass(*PassRegistry::getPassRegistry());
}
};
-struct PostDomOnlyViewer
- : public DOTGraphTraitsViewer<PostDominatorTree, true> {
+struct PostDomOnlyViewer : public DOTGraphTraitsViewer<
+ PostDominatorTreeWrapperPass, true,
+ PostDominatorTree *,
+ PostDominatorTreeWrapperPassAnalysisGraphTraits> {
static char ID;
PostDomOnlyViewer() :
- DOTGraphTraitsViewer<PostDominatorTree, true>("postdomonly", ID){
+ DOTGraphTraitsViewer<PostDominatorTreeWrapperPass, true,
+ PostDominatorTree *,
+ PostDominatorTreeWrapperPassAnalysisGraphTraits>(
+ "postdomonly", ID){
initializePostDomOnlyViewerPass(*PassRegistry::getPassRegistry());
}
};
@@ -175,19 +191,31 @@ struct DomOnlyPrinter : public DOTGraphTraitsPrinter<
};
struct PostDomPrinter
- : public DOTGraphTraitsPrinter<PostDominatorTree, false> {
+ : public DOTGraphTraitsPrinter<
+ PostDominatorTreeWrapperPass, false,
+ PostDominatorTree *,
+ PostDominatorTreeWrapperPassAnalysisGraphTraits> {
static char ID;
PostDomPrinter() :
- DOTGraphTraitsPrinter<PostDominatorTree, false>("postdom", ID) {
+ DOTGraphTraitsPrinter<PostDominatorTreeWrapperPass, false,
+ PostDominatorTree *,
+ PostDominatorTreeWrapperPassAnalysisGraphTraits>(
+ "postdom", ID) {
initializePostDomPrinterPass(*PassRegistry::getPassRegistry());
}
};
struct PostDomOnlyPrinter
- : public DOTGraphTraitsPrinter<PostDominatorTree, true> {
+ : public DOTGraphTraitsPrinter<
+ PostDominatorTreeWrapperPass, true,
+ PostDominatorTree *,
+ PostDominatorTreeWrapperPassAnalysisGraphTraits> {
static char ID;
PostDomOnlyPrinter() :
- DOTGraphTraitsPrinter<PostDominatorTree, true>("postdomonly", ID) {
+ DOTGraphTraitsPrinter<PostDominatorTreeWrapperPass, true,
+ PostDominatorTree *,
+ PostDominatorTreeWrapperPassAnalysisGraphTraits>(
+ "postdomonly", ID) {
initializePostDomOnlyPrinterPass(*PassRegistry::getPassRegistry());
}
};