Do not assert during analysis implementation initialization.
authorDevang Patel <dpatel@apple.com>
Mon, 16 Apr 2007 20:44:16 +0000 (20:44 +0000)
committerDevang Patel <dpatel@apple.com>
Mon, 16 Apr 2007 20:44:16 +0000 (20:44 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36158 91177308-0d34-0410-b5e6-96231b3b80d8

lib/VMCore/PassManager.cpp

index 9a2a57b6095a767245ef1dce6250c3a513a29c05..10e6e2fd8a45dffa127aa97fbc2da5aa05638847 100644 (file)
@@ -781,7 +781,9 @@ void PMDataManager::initializeAnalysisImpl(Pass *P) {
          E = AnUsage.getRequiredSet().end(); I != E; ++I) {
     Pass *Impl = findAnalysisPass(*I, true);
     if (Impl == 0)
-      assert(0 && "Analysis used but not available!");
+      // This may be analysis pass that is initialized on the fly.
+      // If that is not the case then it will raise an assert when it is used.
+      continue;
     AnalysisResolver *AR = P->getResolver();
     AR->addAnalysisImplsPair(*I, Impl);
   }