[llvm-commits] [llvm] r84399 - /llvm/trunk/lib/Analysis/DomPrinter.cpp

Chris Lattner sabre at nondot.org
Sat Oct 17 21:27:14 PDT 2009


Author: lattner
Date: Sat Oct 17 23:27:14 2009
New Revision: 84399

URL: http://llvm.org/viewvc/llvm-project?rev=84399&view=rev
Log:
fix some problems with ID definitions, which will hopefully fix the build bots.

Modified:
    llvm/trunk/lib/Analysis/DomPrinter.cpp

Modified: llvm/trunk/lib/Analysis/DomPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/DomPrinter.cpp?rev=84399&r1=84398&r2=84399&view=diff

==============================================================================
--- llvm/trunk/lib/Analysis/DomPrinter.cpp (original)
+++ llvm/trunk/lib/Analysis/DomPrinter.cpp Sat Oct 17 23:27:14 2009
@@ -78,11 +78,9 @@
 namespace {
 template <class Analysis, bool OnlyBBS>
 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 DomViewer
   : public GenericGraphViewer<DominatorTree, false> {
   static char ID;
-  DomViewer() : GenericGraphViewer<DominatorTree, false>("dom"){}
+  DomViewer() : GenericGraphViewer<DominatorTree, false>("dom", &ID){}
 };
 
 struct DomOnlyViewer
   : public GenericGraphViewer<DominatorTree, true> {
   static char ID;
-  DomOnlyViewer() : GenericGraphViewer<DominatorTree, true>("domonly"){}
+  DomOnlyViewer() : GenericGraphViewer<DominatorTree, true>("domonly", &ID){}
 };
 
 struct PostDomViewer
   : public GenericGraphViewer<PostDominatorTree, false> {
   static char ID;
   PostDomViewer() :
-    GenericGraphViewer<PostDominatorTree, false>("postdom"){}
+    GenericGraphViewer<PostDominatorTree, false>("postdom", &ID){}
 };
 
 struct PostDomOnlyViewer
   : public GenericGraphViewer<PostDominatorTree, true> {
   static char ID;
   PostDomOnlyViewer() :
-    GenericGraphViewer<PostDominatorTree, true>("postdomonly"){}
+    GenericGraphViewer<PostDominatorTree, true>("postdomonly", &ID){}
 };
 } // end anonymous namespace
 





More information about the llvm-commits mailing list