[llvm-commits] [llvm] r47563 - /llvm/trunk/include/llvm/Type.h
Chris Lattner
sabre at nondot.org
Mon Feb 25 13:28:47 PST 2008
Author: lattner
Date: Mon Feb 25 15:28:46 2008
New Revision: 47563
URL: http://llvm.org/viewvc/llvm-project?rev=47563&view=rev
Log:
add an assertion to catch a null PATypeHolder, patch by Erick Tryzelaar
Modified:
llvm/trunk/include/llvm/Type.h
Modified: llvm/trunk/include/llvm/Type.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Type.h?rev=47563&r1=47562&r2=47563&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Type.h (original)
+++ llvm/trunk/include/llvm/Type.h Mon Feb 25 15:28:46 2008
@@ -357,9 +357,10 @@
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();
}
More information about the llvm-commits
mailing list