diff options
-rw-r--r-- | include/llvm/PassAnalysisSupport.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/llvm/PassAnalysisSupport.h b/include/llvm/PassAnalysisSupport.h index 43c353d4d9..fac8cea545 100644 --- a/include/llvm/PassAnalysisSupport.h +++ b/include/llvm/PassAnalysisSupport.h @@ -39,6 +39,7 @@ public: } template<class PassClass> AnalysisUsage &addRequired() { + assert(Pass::getClassPassInfo<PassClass>() && "Pass class not registered!"); Required.push_back(Pass::getClassPassInfo<PassClass>()); return *this; } @@ -53,6 +54,7 @@ public: template<class PassClass> AnalysisUsage &addPreserved() { + assert(Pass::getClassPassInfo<PassClass>() && "Pass class not registered!"); Preserved.push_back(Pass::getClassPassInfo<PassClass>()); return *this; } |