Stop guessing, start thinking, and make PointerUnion3::is actually be correct.
authorDouglas Gregor <dgregor@apple.com>
Tue, 31 Mar 2009 18:31:03 +0000 (18:31 +0000)
committerDouglas Gregor <dgregor@apple.com>
Tue, 31 Mar 2009 18:31:03 +0000 (18:31 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68126 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/ADT/PointerUnion.h

index 0737000c47c0f95d959d1d45fe53b376e4a52490..1075711ec0c93d686aa8146236eb801ba63093c8 100644 (file)
@@ -183,9 +183,7 @@ namespace llvm {
       // 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