diff options
author | Dan Gohman <gohman@apple.com> | 2010-08-20 00:56:16 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2010-08-20 00:56:16 +0000 |
commit | 12bb5054b32224beaf2d21c48bc096973b901fdd (patch) | |
tree | 0a307a8ae480e1f0ca2199016d7009f0e63613e4 /llvm/tools | |
parent | b87ad69350fecaf9f5ff31935417e267523f5c3e (diff) | |
download | bcm5719-llvm-12bb5054b32224beaf2d21c48bc096973b901fdd.tar.gz bcm5719-llvm-12bb5054b32224beaf2d21c48bc096973b901fdd.zip |
Minor cleanups to follow the common convention for pass
registration variables.
llvm-svn: 111596
Diffstat (limited to 'llvm/tools')
-rw-r--r-- | llvm/tools/bugpoint-passes/TestPasses.cpp | 12 | ||||
-rw-r--r-- | llvm/tools/opt/AnalysisWrappers.cpp | 14 | ||||
-rw-r--r-- | llvm/tools/opt/GraphPrinters.cpp | 16 |
3 files changed, 22 insertions, 20 deletions
diff --git a/llvm/tools/bugpoint-passes/TestPasses.cpp b/llvm/tools/bugpoint-passes/TestPasses.cpp index 4ae23f5b762..1535b038856 100644 --- a/llvm/tools/bugpoint-passes/TestPasses.cpp +++ b/llvm/tools/bugpoint-passes/TestPasses.cpp @@ -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"); -} diff --git a/llvm/tools/opt/AnalysisWrappers.cpp b/llvm/tools/opt/AnalysisWrappers.cpp index 2fe5d226ec7..a2b57bb3e11 100644 --- a/llvm/tools/opt/AnalysisWrappers.cpp +++ b/llvm/tools/opt/AnalysisWrappers.cpp @@ -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"); diff --git a/llvm/tools/opt/GraphPrinters.cpp b/llvm/tools/opt/GraphPrinters.cpp index fa4339a0554..6a9e96516db 100644 --- a/llvm/tools/opt/GraphPrinters.cpp +++ b/llvm/tools/opt/GraphPrinters.cpp @@ -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); |