diff --git a/include/llvm/PassAnalysisSupport.h b/include/llvm/PassAnalysisSupport.h index 43c353d4d9e..fac8cea545f 100644 --- a/include/llvm/PassAnalysisSupport.h +++ b/include/llvm/PassAnalysisSupport.h @@ -39,6 +39,7 @@ public: } template AnalysisUsage &addRequired() { + assert(Pass::getClassPassInfo() && "Pass class not registered!"); Required.push_back(Pass::getClassPassInfo()); return *this; } @@ -53,6 +54,7 @@ public: template AnalysisUsage &addPreserved() { + assert(Pass::getClassPassInfo() && "Pass class not registered!"); Preserved.push_back(Pass::getClassPassInfo()); return *this; }