diff --git a/include/llvm/PassRegistry.h b/include/llvm/PassRegistry.h index 327a152147c..6233f24c5fd 100644 --- a/include/llvm/PassRegistry.h +++ b/include/llvm/PassRegistry.h @@ -78,10 +78,6 @@ public: /// registry. Required in order to use the pass with a PassManager. void registerPass(const PassInfo &PI, bool ShouldFree = false); - /// registerPass - Unregister a pass (by means of its PassInfo) with the - /// registry. - void unregisterPass(const PassInfo &PI); - /// registerAnalysisGroup - Register an analysis group (or a pass implementing // an analysis group) with the registry. Like registerPass, this is required // in order for a PassManager to be able to use this group/pass. diff --git a/lib/IR/PassRegistry.cpp b/lib/IR/PassRegistry.cpp index 2d056030fa2..2cff3ccdc23 100644 --- a/lib/IR/PassRegistry.cpp +++ b/lib/IR/PassRegistry.cpp @@ -70,16 +70,6 @@ void PassRegistry::registerPass(const PassInfo &PI, bool ShouldFree) { ToFree.push_back(std::unique_ptr(&PI)); } -void PassRegistry::unregisterPass(const PassInfo &PI) { - sys::SmartScopedWriter Guard(Lock); - MapType::iterator I = PassInfoMap.find(PI.getTypeInfo()); - assert(I != PassInfoMap.end() && "Pass registered but not in map!"); - - // Remove pass from the map. - PassInfoMap.erase(I); - PassInfoStringMap.erase(PI.getPassArgument()); -} - void PassRegistry::enumerateWith(PassRegistrationListener *L) { sys::SmartScopedReader Guard(Lock); for (auto PassInfoPair : PassInfoMap)