From 7883fc2ab1acbd406ad8eb297e4834a1a3cfbddb Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sun, 18 Oct 2009 04:27:14 +0000 Subject: [PATCH] fix some problems with ID definitions, which will hopefully fix the build bots. llvm-svn: 84399 --- llvm/lib/Analysis/DomPrinter.cpp | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/llvm/lib/Analysis/DomPrinter.cpp b/llvm/lib/Analysis/DomPrinter.cpp index f7918177ccaa..82e13a9ef264 100644 --- a/llvm/lib/Analysis/DomPrinter.cpp +++ b/llvm/lib/Analysis/DomPrinter.cpp @@ -78,11 +78,9 @@ struct DOTGraphTraits namespace { template struct GenericGraphViewer : public FunctionPass { - - static char ID; std::string Name; - GenericGraphViewer(std::string GraphName) : FunctionPass(&ID) { + GenericGraphViewer(std::string GraphName, const void *ID) : FunctionPass(ID) { Name = GraphName; } @@ -104,27 +102,27 @@ struct GenericGraphViewer : public FunctionPass { struct DomViewer : public GenericGraphViewer { static char ID; - DomViewer() : GenericGraphViewer("dom"){} + DomViewer() : GenericGraphViewer("dom", &ID){} }; struct DomOnlyViewer : public GenericGraphViewer { static char ID; - DomOnlyViewer() : GenericGraphViewer("domonly"){} + DomOnlyViewer() : GenericGraphViewer("domonly", &ID){} }; struct PostDomViewer : public GenericGraphViewer { static char ID; PostDomViewer() : - GenericGraphViewer("postdom"){} + GenericGraphViewer("postdom", &ID){} }; struct PostDomOnlyViewer : public GenericGraphViewer { static char ID; PostDomOnlyViewer() : - GenericGraphViewer("postdomonly"){} + GenericGraphViewer("postdomonly", &ID){} }; } // end anonymous namespace