Silencing an "enumeral and non-enumeral type in conditional expression" warning;...
[oota-llvm.git] / lib / IR / PassRegistry.cpp
index 2d056030fa265719dc50c1b23b97de9f343ded54..b879fef3f4a725128f0fea00b36c91f0c1e9a3dd 100644 (file)
@@ -70,16 +70,6 @@ void PassRegistry::registerPass(const PassInfo &PI, bool ShouldFree) {
     ToFree.push_back(std::unique_ptr<const PassInfo>(&PI));
 }
 
-void PassRegistry::unregisterPass(const PassInfo &PI) {
-  sys::SmartScopedWriter<true> 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<true> Guard(Lock);
   for (auto PassInfoPair : PassInfoMap)
@@ -111,10 +101,6 @@ void PassRegistry::registerAnalysisGroup(const void *InterfaceID,
     // the interface.
     ImplementationInfo->addInterfaceImplemented(InterfaceInfo);
 
-    AnalysisGroupInfo &AGI = AnalysisGroupInfoMap[InterfaceInfo];
-    assert(AGI.Implementations.count(ImplementationInfo) == 0 &&
-           "Cannot add a pass to the same analysis group more than once!");
-    AGI.Implementations.insert(ImplementationInfo);
     if (isDefault) {
       assert(InterfaceInfo->getNormalCtor() == nullptr &&
              "Default implementation for analysis group already specified!");