aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-03-31 00:34:31 +0000
committerDouglas Gregor <dgregor@apple.com>2009-03-31 00:34:31 +0000
commita7425d7fde61c2207a4467464df90b5e3e58a769 (patch)
treec0eef3ccd191a6da34fbee1db6fe699a4807a900
parent80c93e7442f89f4a0565258c56dca446e1574f9b (diff)
downloadexternal_llvm-a7425d7fde61c2207a4467464df90b5e3e58a769.zip
external_llvm-a7425d7fde61c2207a4467464df90b5e3e58a769.tar.gz
external_llvm-a7425d7fde61c2207a4467464df90b5e3e58a769.tar.bz2
Really, really fix PointerUnion3::is
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68079 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/llvm/ADT/PointerUnion.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/llvm/ADT/PointerUnion.h b/include/llvm/ADT/PointerUnion.h
index 43f5e09..0737000 100644
--- a/include/llvm/ADT/PointerUnion.h
+++ b/include/llvm/ADT/PointerUnion.h
@@ -182,7 +182,7 @@ namespace llvm {
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;