diff options
author | Chris Lattner <sabre@nondot.org> | 2002-08-21 22:14:28 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2002-08-21 22:14:28 +0000 |
commit | 03e26ba35b1f3244315e1444fabe0b20bec47bb7 (patch) | |
tree | 4e46290c96eb00ddc78ec3cde133ff0381e2f965 /include | |
parent | 1d63a167ecf964d00d2865fec182f1d67e7e3f36 (diff) | |
download | external_llvm-03e26ba35b1f3244315e1444fabe0b20bec47bb7.zip external_llvm-03e26ba35b1f3244315e1444fabe0b20bec47bb7.tar.gz external_llvm-03e26ba35b1f3244315e1444fabe0b20bec47bb7.tar.bz2 |
Add assertion checks to nail bugs early.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3424 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-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 43c353d..fac8cea 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; } |