aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/ADT/PointerUnion.h
diff options
context:
space:
mode:
authorDouglas Gregor <doug.gregor@gmail.com>2009-03-31 00:34:31 +0000
committerDouglas Gregor <doug.gregor@gmail.com>2009-03-31 00:34:31 +0000
commitadfedb38cd30184427dcd14dfb96acc5c905ca84 (patch)
treec0eef3ccd191a6da34fbee1db6fe699a4807a900 /include/llvm/ADT/PointerUnion.h
parentbeac3d8e2dd9a17cb7524566c693a5acf3439c96 (diff)
downloadexternal_llvm-adfedb38cd30184427dcd14dfb96acc5c905ca84.zip
external_llvm-adfedb38cd30184427dcd14dfb96acc5c905ca84.tar.gz
external_llvm-adfedb38cd30184427dcd14dfb96acc5c905ca84.tar.bz2
Really, really fix PointerUnion3::is
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68079 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/ADT/PointerUnion.h')
-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;