diff options
Diffstat (limited to 'lib/Analysis/ProfileInfo.cpp')
-rw-r--r-- | lib/Analysis/ProfileInfo.cpp | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/lib/Analysis/ProfileInfo.cpp b/lib/Analysis/ProfileInfo.cpp index 7678cd2..835515e 100644 --- a/lib/Analysis/ProfileInfo.cpp +++ b/lib/Analysis/ProfileInfo.cpp @@ -24,8 +24,12 @@ #include <limits> using namespace llvm; +namespace llvm { + template<> char ProfileInfoT<Function,BasicBlock>::ID = 0; +} + // Register the ProfileInfo interface, providing a nice name to refer to. -static RegisterAnalysisGroup<ProfileInfo> Z("Profile Information"); +INITIALIZE_ANALYSIS_GROUP(ProfileInfo, "Profile Information", NoProfileInfo) namespace llvm { @@ -44,9 +48,6 @@ ProfileInfoT<Function, BasicBlock>::~ProfileInfoT() { } template<> -char ProfileInfoT<Function,BasicBlock>::ID = 0; - -template<> char ProfileInfoT<MachineFunction, MachineBasicBlock>::ID = 0; template<> @@ -1076,7 +1077,9 @@ raw_ostream& operator<<(raw_ostream &O, std::pair<const MachineBasicBlock *, con namespace { struct NoProfileInfo : public ImmutablePass, public ProfileInfo { static char ID; // Class identification, replacement for typeinfo - NoProfileInfo() : ImmutablePass(ID) {} + NoProfileInfo() : ImmutablePass(ID) { + initializeNoProfileInfoPass(*PassRegistry::getPassRegistry()); + } /// getAdjustedAnalysisPointer - This method is used when a pass implements /// an analysis interface through multiple inheritance. If needed, it @@ -1097,6 +1100,6 @@ namespace { char NoProfileInfo::ID = 0; // Register this pass... INITIALIZE_AG_PASS(NoProfileInfo, ProfileInfo, "no-profile", - "No Profile Information", false, true, true); + "No Profile Information", false, true, true) ImmutablePass *llvm::createNoProfileInfoPass() { return new NoProfileInfo(); } |