[llvm-commits] [llvm] r68079 - /llvm/trunk/include/llvm/ADT/PointerUnion.h
Douglas Gregor
dgregor at apple.com
Mon Mar 30 17:34:32 PDT 2009
Author: dgregor
Date: Mon Mar 30 19:34:31 2009
New Revision: 68079
URL: http://llvm.org/viewvc/llvm-project?rev=68079&view=rev
Log:
Really, really fix PointerUnion3::is
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=68079&r1=68078&r2=68079&view=diff
==============================================================================
--- llvm/trunk/include/llvm/ADT/PointerUnion.h (original)
+++ llvm/trunk/include/llvm/ADT/PointerUnion.h Mon Mar 30 19:34:31 2009
@@ -182,7 +182,7 @@
int is() const {
// Is it PT1/PT2?
if (::llvm::getPointerUnionTypeNum<PT1, PT2>((T*)0) != -1)
- return Val.get<InnerUnion>().is<T>();
+ return Val.is<InnerUnion>() && Val.get<InnerUnion>().is<T>();
// Must be PT3 or statically invalid.
assert(Val.is<T>());
return true;
More information about the llvm-commits
mailing list