aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2008-05-13 00:00:25 +0000
committerDan Gohman <gohman@apple.com>2008-05-13 00:00:25 +0000
commit844731a7f1909f55935e3514c9e713a62d67662e (patch)
tree9221560124d6ed762ef6e5bbda45f4038dacdeb0 /lib
parenta334d5f5355be5c26ea2d3c28456722afd1a4559 (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')
-rw-r--r--lib/Analysis/AliasAnalysis.cpp4
-rw-r--r--lib/Analysis/AliasAnalysisCounter.cpp20
-rw-r--r--lib/Analysis/AliasAnalysisEvaluator.cpp27
-rw-r--r--lib/Analysis/AliasDebugger.cpp9
-rw-r--r--lib/Analysis/AliasSetTracker.cpp6
-rw-r--r--lib/Analysis/BasicAliasAnalysis.cpp28
-rw-r--r--lib/Analysis/CFGPrinter.cpp35
-rw-r--r--lib/Analysis/IPA/Andersens.cpp29
-rw-r--r--lib/Analysis/IPA/CallGraph.cpp9
-rw-r--r--lib/Analysis/IPA/CallGraphSCCPass.cpp4
-rw-r--r--lib/Analysis/IPA/GlobalsModRef.cpp11
-rw-r--r--lib/Analysis/InstCount.cpp8
-rw-r--r--lib/Analysis/LoadValueNumbering.cpp13
-rw-r--r--lib/Analysis/MemoryDependenceAnalysis.cpp14
-rw-r--r--lib/Analysis/ProfileInfo.cpp18
-rw-r--r--lib/Analysis/ProfileInfoLoaderPass.cpp20
-rw-r--r--lib/Analysis/ScalarEvolution.cpp8
-rw-r--r--lib/Analysis/ValueNumbering.cpp16
-rw-r--r--lib/Archive/ArchiveReader.cpp2
-rw-r--r--lib/Archive/ArchiveWriter.cpp4
-rw-r--r--lib/Bitcode/Writer/ValueEnumerator.cpp28
-rw-r--r--lib/CodeGen/BranchFolding.cpp12
-rw-r--r--lib/CodeGen/CollectorMetadata.cpp6
-rw-r--r--lib/CodeGen/LiveIntervalAnalysis.cpp52
-rw-r--r--lib/CodeGen/MachineDominators.cpp6
-rw-r--r--lib/CodeGen/MachineLICM.cpp8
-rw-r--r--lib/CodeGen/MachineLoopInfo.cpp6
-rw-r--r--lib/CodeGen/MachineModuleInfo.cpp8
-rw-r--r--lib/CodeGen/MachineSink.cpp7
-rw-r--r--lib/CodeGen/OcamlCollector.cpp6
-rw-r--r--lib/CodeGen/PHIElimination.cpp8
-rw-r--r--lib/CodeGen/Passes.cpp13
-rw-r--r--lib/CodeGen/RegAllocBigBlock.cpp8
-rw-r--r--lib/CodeGen/RegAllocLocal.cpp9
-rw-r--r--lib/CodeGen/RegisterCoalescer.cpp4
-rw-r--r--lib/CodeGen/SelectionDAG/SelectionDAG.cpp2
-rw-r--r--lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp22
-rw-r--r--lib/CodeGen/ShadowStackCollector.cpp9
-rw-r--r--lib/CodeGen/SimpleRegisterCoalescing.cpp26
-rw-r--r--lib/CodeGen/StrongPHIElimination.cpp13
-rw-r--r--lib/CodeGen/TwoAddressInstructionPass.cpp8
-rw-r--r--lib/CodeGen/UnreachableBlockElim.cpp6
-rw-r--r--lib/CodeGen/VirtRegMap.cpp18
-rw-r--r--lib/ExecutionEngine/Interpreter/Interpreter.cpp4
-rw-r--r--lib/ExecutionEngine/JIT/JIT.cpp4
-rw-r--r--lib/ExecutionEngine/JIT/JITDwarfEmitter.cpp4
-rw-r--r--lib/Support/Statistic.cpp4
-rw-r--r--lib/System/Unix/Unix.h2
-rw-r--r--lib/Target/ARM/ARMTargetMachine.cpp8
-rw-r--r--lib/Target/Alpha/AlphaTargetMachine.cpp6
-rw-r--r--lib/Target/CBackend/CBackend.cpp6
-rw-r--r--lib/Target/CellSPU/SPUISelDAGToDAG.cpp4
-rw-r--r--lib/Target/CppBackend/CPPBackend.cpp6
-rw-r--r--lib/Target/IA64/IA64TargetMachine.cpp4
-rw-r--r--lib/Target/MSIL/MSILWriter.cpp2
-rw-r--r--lib/Target/Mips/MipsTargetMachine.cpp6
-rw-r--r--lib/Target/PowerPC/PPCISelLowering.cpp4
-rw-r--r--lib/Target/PowerPC/PPCTargetMachine.cpp12
-rw-r--r--lib/Target/Sparc/SparcTargetMachine.cpp6
-rw-r--r--lib/Target/TargetData.cpp15
-rw-r--r--lib/Target/TargetMachine.cpp221
-rw-r--r--lib/Target/X86/X86Subtarget.cpp2
-rw-r--r--lib/Target/X86/X86TargetMachine.cpp12
-rw-r--r--lib/Transforms/Hello/Hello.cpp13
-rw-r--r--lib/Transforms/IPO/ArgumentPromotion.cpp8
-rw-r--r--lib/Transforms/IPO/ConstantMerge.cpp7
-rw-r--r--lib/Transforms/IPO/DeadArgumentElimination.cpp15
-rw-r--r--lib/Transforms/IPO/DeadTypeElimination.cpp5
-rw-r--r--lib/Transforms/IPO/GlobalDCE.cpp5
-rw-r--r--lib/Transforms/IPO/GlobalOpt.cpp10
-rw-r--r--lib/Transforms/IPO/IPConstantPropagation.cpp6
-rw-r--r--lib/Transforms/IPO/IndMemRemoval.cpp5
-rw-r--r--lib/Transforms/IPO/InlineSimple.cpp6
-rw-r--r--lib/Transforms/IPO/Inliner.cpp6
-rw-r--r--lib/Transforms/IPO/Internalize.cpp29
-rw-r--r--lib/Transforms/IPO/LoopExtractor.cpp38
-rw-r--r--lib/Transforms/IPO/LowerSetJmp.cpp6
-rw-r--r--lib/Transforms/IPO/PruneEH.cpp7
-rw-r--r--lib/Transforms/IPO/RaiseAllocations.cpp7
-rw-r--r--lib/Transforms/IPO/StripDeadPrototypes.cpp8
-rw-r--r--lib/Transforms/IPO/StripSymbols.cpp7
-rw-r--r--lib/Transforms/IPO/StructRetPromotion.cpp8
-rw-r--r--lib/Transforms/Instrumentation/BlockProfiling.cpp22
-rw-r--r--lib/Transforms/Instrumentation/EdgeProfiling.cpp8
-rw-r--r--lib/Transforms/Instrumentation/RSProfiling.cpp35
-rw-r--r--lib/Transforms/Scalar/ADCE.cpp6
-rw-r--r--lib/Transforms/Scalar/BasicBlockPlacement.cpp8
-rw-r--r--lib/Transforms/Scalar/CodeGenPrepare.cpp3
-rw-r--r--lib/Transforms/Scalar/CondPropagate.cpp6
-rw-r--r--lib/Transforms/Scalar/ConstantProp.cpp8
-rw-r--r--lib/Transforms/Scalar/DCE.cpp13
-rw-r--r--lib/Transforms/Scalar/DeadStoreElimination.cpp5
-rw-r--r--lib/Transforms/Scalar/GCSE.cpp7
-rw-r--r--lib/Transforms/Scalar/GVNPRE.cpp7
-rw-r--r--lib/Transforms/Scalar/IndVarSimplify.cpp7
-rw-r--r--lib/Transforms/Scalar/InstructionCombining.cpp17
-rw-r--r--lib/Transforms/Scalar/JumpThreading.cpp6
-rw-r--r--lib/Transforms/Scalar/LICM.cpp14
-rw-r--r--lib/Transforms/Scalar/LoopDeletion.cpp6
-rw-r--r--lib/Transforms/Scalar/LoopIndexSplit.cpp7
-rw-r--r--lib/Transforms/Scalar/LoopRotation.cpp6
-rw-r--r--lib/Transforms/Scalar/LoopStrengthReduce.cpp6
-rw-r--r--lib/Transforms/Scalar/LoopUnroll.cpp21
-rw-r--r--lib/Transforms/Scalar/LoopUnswitch.cpp22
-rw-r--r--lib/Transforms/Scalar/PredicateSimplifier.cpp8
-rw-r--r--lib/Transforms/Scalar/Reassociate.cpp8
-rw-r--r--lib/Transforms/Scalar/Reg2Mem.cpp7
-rw-r--r--lib/Transforms/Scalar/SCCP.cpp14
-rw-r--r--lib/Transforms/Scalar/ScalarReplAggregates.cpp6
-rw-r--r--lib/Transforms/Scalar/SimplifyCFG.cpp5
-rw-r--r--lib/Transforms/Scalar/TailDuplication.cpp12
-rw-r--r--lib/Transforms/Scalar/TailRecursionElimination.cpp5
-rw-r--r--lib/Transforms/Utils/BasicInliner.cpp8
-rw-r--r--lib/Transforms/Utils/BreakCriticalEdges.cpp8
-rw-r--r--lib/Transforms/Utils/LCSSA.cpp6
-rw-r--r--lib/Transforms/Utils/LoopSimplify.cpp8
-rw-r--r--lib/Transforms/Utils/LowerAllocations.cpp8
-rw-r--r--lib/Transforms/Utils/LowerInvoke.cpp8
-rw-r--r--lib/Transforms/Utils/LowerSwitch.cpp8
-rw-r--r--lib/Transforms/Utils/Mem2Reg.cpp6
-rw-r--r--lib/VMCore/Constants.cpp4
-rw-r--r--lib/VMCore/PassManager.cpp4
-rw-r--r--lib/VMCore/Type.cpp3
-rw-r--r--lib/VMCore/Verifier.cpp14
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::