[llvm-commits] [llvm] r68126 - /llvm/trunk/include/llvm/ADT/PointerUnion.h
Douglas Gregor
dgregor at apple.com
Tue Mar 31 11:31:03 PDT 2009
Author: dgregor
Date: Tue Mar 31 13:31:03 2009
New Revision: 68126
URL: http://llvm.org/viewvc/llvm-project?rev=68126&view=rev
Log:
Stop guessing, start thinking, and make PointerUnion3::is actually be correct.
Modified:
llvm/trunk/include/llvm/ADT/PointerUnion.h
Modified: llvm/trunk/include/llvm/ADT/PointerUnion.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/PointerUnion.h?rev=68126&r1=68125&r2=68126&view=diff
==============================================================================
--- llvm/trunk/include/llvm/ADT/PointerUnion.h (original)
+++ llvm/trunk/include/llvm/ADT/PointerUnion.h Tue Mar 31 13:31:03 2009
@@ -183,9 +183,7 @@
// Is it PT1/PT2?
if (::llvm::getPointerUnionTypeNum<PT1, PT2>((T*)0) != -1)
return Val.is<InnerUnion>() && Val.get<InnerUnion>().is<T>();
- // Must be PT3 or statically invalid.
- assert(Val.is<T>());
- return true;
+ return Val.is<T>();
}
/// get<T>() - Return the value of the specified pointer type. If the
More information about the llvm-commits
mailing list