diff options
author | Chris Lattner <sabre@nondot.org> | 2008-02-25 21:28:46 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2008-02-25 21:28:46 +0000 |
commit | f8d8b2b53ae5206015ab6a13412b223187406ecf (patch) | |
tree | 74cd8f559cd576184346c72ab1962d5be260e2ac /include/llvm/Type.h | |
parent | 2e68b6f52d0979575b2f02ed29717d907ba0684c (diff) | |
download | llvm-f8d8b2b53ae5206015ab6a13412b223187406ecf.tar.gz llvm-f8d8b2b53ae5206015ab6a13412b223187406ecf.tar.bz2 llvm-f8d8b2b53ae5206015ab6a13412b223187406ecf.tar.xz |
add an assertion to catch a null PATypeHolder, patch by Erick Tryzelaar
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47563 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Type.h')
-rw-r--r-- | include/llvm/Type.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/llvm/Type.h b/include/llvm/Type.h index db177994ae..1ee84e2cab 100644 --- a/include/llvm/Type.h +++ b/include/llvm/Type.h @@ -357,9 +357,10 @@ inline void PATypeHandle::removeUser() { Ty->removeAbstractTypeUser(User); } -// Define inline methods for PATypeHolder... +// Define inline methods for PATypeHolder. inline void PATypeHolder::addRef() { + assert(Ty && "Type Holder has a null type!"); if (Ty->isAbstract()) Ty->addRef(); } |