Minor cleanups to follow the common convention for pass
authorDan Gohman <gohman@apple.com>
Fri, 20 Aug 2010 00:56:16 +0000 (00:56 +0000)
committerDan Gohman <gohman@apple.com>
Fri, 20 Aug 2010 00:56:16 +0000 (00:56 +0000)
registration variables.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111596 91177308-0d34-0410-b5e6-96231b3b80d8

tools/bugpoint-passes/TestPasses.cpp
tools/opt/AnalysisWrappers.cpp
tools/opt/GraphPrinters.cpp

index 4ae23f5b762428d4faada3663a74de58f940516f..1535b0388561364fa30e3a5873454ca80caa4a91 100644 (file)
@@ -41,12 +41,12 @@ namespace {
       return false;
     }
   };
+}
 
-  char CrashOnCalls::ID = 0;
-  RegisterPass<CrashOnCalls>
+char CrashOnCalls::ID = 0;
+static RegisterPass<CrashOnCalls>
   X("bugpoint-crashcalls",
     "BugPoint Test Pass - Intentionally crash on CallInsts");
-}
 
 namespace {
   /// DeleteCalls - This pass is used to test bugpoint.  It intentionally
@@ -67,9 +67,9 @@ namespace {
       return false;
     }
   };
+}
  
-  char DeleteCalls::ID = 0;
-  RegisterPass<DeleteCalls>
+char DeleteCalls::ID = 0;
+static RegisterPass<DeleteCalls>
   Y("bugpoint-deletecalls",
     "BugPoint Test Pass - Intentionally 'misoptimize' CallInsts");
-}
index 2fe5d226ec761658ac2e5aeda4805166eeab5c41..a2b57bb3e1151783ea6eac88a9c64e820da111a0 100644 (file)
@@ -66,12 +66,14 @@ namespace {
       AU.setPreservesAll();
     }
   };
+}
 
-  char ExternalFunctionsPassedConstants::ID = 0;
-  RegisterPass<ExternalFunctionsPassedConstants>
+char ExternalFunctionsPassedConstants::ID = 0;
+static RegisterPass<ExternalFunctionsPassedConstants>
   P1("print-externalfnconstants",
      "Print external fn callsites passed constants");
 
+namespace {
   struct CallGraphPrinter : public ModulePass {
     static char ID; // Pass ID, replacement for typeid
     CallGraphPrinter() : ModulePass(ID) {}
@@ -85,8 +87,8 @@ namespace {
       return false;
     }
   };
-
-  char CallGraphPrinter::ID = 0;
-  RegisterPass<CallGraphPrinter>
-    P2("print-callgraph", "Print a call graph");
 }
+
+char CallGraphPrinter::ID = 0;
+static RegisterPass<CallGraphPrinter>
+  P2("print-callgraph", "Print a call graph");
index fa4339a0554e6eeca5b026d7dc8a3de59acb81d8..6a9e96516db5c8adfdadbe8a61c05a88f69a0e8f 100644 (file)
@@ -79,12 +79,12 @@ namespace {
       AU.setPreservesAll();
     }
   };
-
-  char CallGraphPrinter::ID = 0;
-  RegisterPass<CallGraphPrinter> P2("dot-callgraph",
-                                    "Print Call Graph to 'dot' file");
 }
 
+char CallGraphPrinter::ID = 0;
+static RegisterPass<CallGraphPrinter> P2("dot-callgraph",
+                                         "Print Call Graph to 'dot' file");
+
 //===----------------------------------------------------------------------===//
 //                            DomInfoPrinter Pass
 //===----------------------------------------------------------------------===//
@@ -110,8 +110,8 @@ namespace {
       return false;
     }
   };
-
-  char DomInfoPrinter::ID = 0;
-  static RegisterPass<DomInfoPrinter>
-  DIP("print-dom-info", "Dominator Info Printer", true, true);
 }
+
+char DomInfoPrinter::ID = 0;
+static RegisterPass<DomInfoPrinter>
+DIP("print-dom-info", "Dominator Info Printer", true, true);