summaryrefslogtreecommitdiff
path: root/include/llvm/Type.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/Type.h')
-rw-r--r--include/llvm/Type.h3
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();
}