From 57d03e112bedeef5aef074166483c2e55e0b9bf5 Mon Sep 17 00:00:00 2001 From: Lauro Ramos Venancio Date: Wed, 2 May 2007 20:37:47 +0000 Subject: [PATCH] Fix build error. llvm-svn: 36648 --- lib/Analysis/AliasAnalysis.cpp | 2 +- lib/Analysis/IPA/CallGraph.cpp | 6 ++++-- lib/Analysis/ProfileInfo.cpp | 2 +- lib/Analysis/ScalarEvolution.cpp | 2 +- lib/CodeGen/LiveIntervalAnalysis.cpp | 2 +- lib/CodeGen/MachineModuleInfo.cpp | 2 +- lib/Target/TargetData.cpp | 2 +- lib/Transforms/Instrumentation/RSProfiling.cpp | 7 ++++--- 8 files changed, 14 insertions(+), 11 deletions(-) diff --git a/lib/Analysis/AliasAnalysis.cpp b/lib/Analysis/AliasAnalysis.cpp index 7499db562b7..ab29e4ebb46 100644 --- a/lib/Analysis/AliasAnalysis.cpp +++ b/lib/Analysis/AliasAnalysis.cpp @@ -34,9 +34,9 @@ using namespace llvm; // Register the AliasAnalysis interface, providing a nice name to refer to. namespace { - const int AliasAnalysis::ID = 0; RegisterAnalysisGroup Z("Alias Analysis"); } +const int AliasAnalysis::ID = 0; //===----------------------------------------------------------------------===// // Default chaining methods diff --git a/lib/Analysis/IPA/CallGraph.cpp b/lib/Analysis/IPA/CallGraph.cpp index 43e70bb2184..ad6c898540e 100644 --- a/lib/Analysis/IPA/CallGraph.cpp +++ b/lib/Analysis/IPA/CallGraph.cpp @@ -190,14 +190,16 @@ private: } }; -const int CallGraph::ID = 0; + RegisterAnalysisGroup X("Call Graph"); -const int BasicCallGraph::ID = 0; RegisterPass Y("basiccg", "Basic CallGraph Construction"); RegisterAnalysisGroup Z(Y); } //End anonymous namespace +const int CallGraph::ID = 0; +const int BasicCallGraph::ID = 0; + void CallGraph::initialize(Module &M) { Mod = &M; } diff --git a/lib/Analysis/ProfileInfo.cpp b/lib/Analysis/ProfileInfo.cpp index 27da8162080..2a6a6a50bd0 100644 --- a/lib/Analysis/ProfileInfo.cpp +++ b/lib/Analysis/ProfileInfo.cpp @@ -22,9 +22,9 @@ using namespace llvm; // Register the ProfileInfo interface, providing a nice name to refer to. namespace { - const int ProfileInfo::ID = 0; RegisterAnalysisGroup Z("Profile Information"); } +const int ProfileInfo::ID = 0; ProfileInfo::~ProfileInfo() {} diff --git a/lib/Analysis/ScalarEvolution.cpp b/lib/Analysis/ScalarEvolution.cpp index 5dae7f0bf1c..2c591fc0d5b 100644 --- a/lib/Analysis/ScalarEvolution.cpp +++ b/lib/Analysis/ScalarEvolution.cpp @@ -102,10 +102,10 @@ MaxBruteForceIterations("scalar-evolution-max-iterations", cl::ReallyHidden, cl::init(100)); namespace { - const int ScalarEvolution::ID = 0; RegisterPass R("scalar-evolution", "Scalar Evolution Analysis"); } +const int ScalarEvolution::ID = 0; //===----------------------------------------------------------------------===// // SCEV class definitions diff --git a/lib/CodeGen/LiveIntervalAnalysis.cpp b/lib/CodeGen/LiveIntervalAnalysis.cpp index cc6c23f59f6..d11de96bec8 100644 --- a/lib/CodeGen/LiveIntervalAnalysis.cpp +++ b/lib/CodeGen/LiveIntervalAnalysis.cpp @@ -44,8 +44,8 @@ STATISTIC(numPeep , "Number of identity moves eliminated after coalescing"); STATISTIC(numFolded , "Number of loads/stores folded into instructions"); STATISTIC(numAborts , "Number of times interval joining aborted"); +const int LiveIntervals::ID = 0; namespace { - const int LiveIntervals::ID = 0; RegisterPass X("liveintervals", "Live Interval Analysis"); static cl::opt diff --git a/lib/CodeGen/MachineModuleInfo.cpp b/lib/CodeGen/MachineModuleInfo.cpp index 6421396faac..d62eb962a3e 100644 --- a/lib/CodeGen/MachineModuleInfo.cpp +++ b/lib/CodeGen/MachineModuleInfo.cpp @@ -28,9 +28,9 @@ using namespace llvm::dwarf; // Handle the Pass registration stuff necessary to use TargetData's. namespace { - const int MachineModuleInfo::ID = 0; RegisterPass X("machinemoduleinfo", "Module Information"); } +const int MachineModuleInfo::ID = 0; //===----------------------------------------------------------------------===// diff --git a/lib/Target/TargetData.cpp b/lib/Target/TargetData.cpp index d1842fe7de2..9492c8aad21 100644 --- a/lib/Target/TargetData.cpp +++ b/lib/Target/TargetData.cpp @@ -33,9 +33,9 @@ using namespace llvm; // Handle the Pass registration stuff necessary to use TargetData's. namespace { // Register the default SparcV9 implementation... - const int TargetData::ID = 0; RegisterPass X("targetdata", "Target Data Layout"); } +const int TargetData::ID = 0; //===----------------------------------------------------------------------===// // Support for StructLayout diff --git a/lib/Transforms/Instrumentation/RSProfiling.cpp b/lib/Transforms/Instrumentation/RSProfiling.cpp index ad9a841cb0d..321e3908e06 100644 --- a/lib/Transforms/Instrumentation/RSProfiling.cpp +++ b/lib/Transforms/Instrumentation/RSProfiling.cpp @@ -81,9 +81,7 @@ namespace { } }; - const int RSProfilers::ID = 0; static RegisterAnalysisGroup A("Profiling passes"); - const int NullProfilerRS::ID = 0; static RegisterPass NP("insert-null-profiling-rs", "Measure profiling framework overhead"); static RegisterAnalysisGroup NPT(NP); @@ -160,11 +158,14 @@ namespace { virtual void getAnalysisUsage(AnalysisUsage &AU) const; }; - const int ProfilerRS::ID = 0; RegisterPass X("insert-rs-profiling-framework", "Insert random sampling instrumentation framework"); } +const int RSProfilers::ID = 0; +const int NullProfilerRS::ID = 0; +const int ProfilerRS::ID = 0; + //Local utilities static void ReplacePhiPred(BasicBlock* btarget, BasicBlock* bold, BasicBlock* bnew);