diff options
author | Dan Gohman <gohman@apple.com> | 2008-05-13 00:00:25 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2008-05-13 00:00:25 +0000 |
commit | 844731a7f1909f55935e3514c9e713a62d67662e (patch) | |
tree | 9221560124d6ed762ef6e5bbda45f4038dacdeb0 /lib | |
parent | a334d5f5355be5c26ea2d3c28456722afd1a4559 (diff) |
Clean up the use of static and anonymous namespaces. This turned up
several things that were neither in an anonymous namespace nor static
but not intended to be global.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51017 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
124 files changed, 783 insertions, 705 deletions
diff --git a/lib/Analysis/AliasAnalysis.cpp b/lib/Analysis/AliasAnalysis.cpp index 04ad7de7bd..be42f749b4 100644 --- a/lib/Analysis/AliasAnalysis.cpp +++ b/lib/Analysis/AliasAnalysis.cpp @@ -34,9 +34,7 @@ using namespace llvm; // Register the AliasAnalysis interface, providing a nice name to refer to. -namespace { - RegisterAnalysisGroup<AliasAnalysis> Z("Alias Analysis"); -} +static RegisterAnalysisGroup<AliasAnalysis> Z("Alias Analysis"); char AliasAnalysis::ID = 0; //===----------------------------------------------------------------------===// diff --git a/lib/Analysis/AliasAnalysisCounter.cpp b/lib/Analysis/AliasAnalysisCounter.cpp index 9c42902a04..48f00ad222 100644 --- a/lib/Analysis/AliasAnalysisCounter.cpp +++ b/lib/Analysis/AliasAnalysisCounter.cpp @@ -21,12 +21,12 @@ #include "llvm/Support/Streams.h" using namespace llvm; -namespace { - static cl::opt<bool> - PrintAll("count-aa-print-all-queries", cl::ReallyHidden); - static cl::opt<bool> - PrintAllFailures("count-aa-print-all-failed-queries", cl::ReallyHidden); +static cl::opt<bool> +PrintAll("count-aa-print-all-queries", cl::ReallyHidden); +static cl::opt<bool> +PrintAllFailures("count-aa-print-all-failed-queries", cl::ReallyHidden); +namespace { class VISIBILITY_HIDDEN AliasAnalysisCounter : public ModulePass, public AliasAnalysis { unsigned No, May, Must; @@ -113,13 +113,13 @@ namespace { return AliasAnalysis::getModRefInfo(CS1,CS2); } }; - - char AliasAnalysisCounter::ID = 0; - RegisterPass<AliasAnalysisCounter> - X("count-aa", "Count Alias Analysis Query Responses", false, true); - RegisterAnalysisGroup<AliasAnalysis> Y(X); } +char AliasAnalysisCounter::ID = 0; +static RegisterPass<AliasAnalysisCounter> +X("count-aa", "Count Alias Analysis Query Responses", false, true); +static RegisterAnalysisGroup<AliasAnalysis> Y(X); + ModulePass *llvm::createAliasAnalysisCounterPass() { return new AliasAnalysisCounter(); } diff --git a/lib/Analysis/AliasAnalysisEvaluator.cpp b/lib/Analysis/AliasAnalysisEvaluator.cpp index 704ab8273c..af15d0f4ad 100644 --- a/lib/Analysis/AliasAnalysisEvaluator.cpp +++ b/lib/Analysis/AliasAnalysisEvaluator.cpp @@ -34,19 +34,18 @@ #include <sstream> using namespace llvm; -namespace { - static cl::opt<bool> - PrintAll("print-all-alias-modref-info", cl::ReallyHidden); +static cl::opt<bool> PrintAll("print-all-alias-modref-info", cl::ReallyHidden); - static cl::opt<bool> PrintNoAlias("print-no-aliases", cl::ReallyHidden); - static cl::opt<bool> PrintMayAlias("print-may-aliases", cl:: |