From 03e26ba35b1f3244315e1444fabe0b20bec47bb7 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Wed, 21 Aug 2002 22:14:28 +0000 Subject: [PATCH] Add assertion checks to nail bugs early. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3424 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/PassAnalysisSupport.h | 2 ++ 1 file changed, 2 insertions(+) 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; }