From: Chris Lattner Date: Mon, 25 Feb 2008 21:28:46 +0000 (+0000) Subject: add an assertion to catch a null PATypeHolder, patch by Erick Tryzelaar X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=f8d8b2b53ae5206015ab6a13412b223187406ecf;p=oota-llvm.git 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 --- diff --git a/include/llvm/Type.h b/include/llvm/Type.h index db177994aee..1ee84e2cabe 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(); }