summaryrefslogtreecommitdiffstats
path: root/llvm/include
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2013-02-22 18:58:26 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2013-02-22 18:58:26 +0000
commit3abc30a497dc002d45d88c1687a10cff50bda824 (patch)
tree84be8a8a5f555b12a93ceed761dc7e5375ae3d72 /llvm/include
parent832de9fcf1793a73a9f4909346d9938b1f56304b (diff)
downloadbcm5719-llvm-3abc30a497dc002d45d88c1687a10cff50bda824.tar.gz
bcm5719-llvm-3abc30a497dc002d45d88c1687a10cff50bda824.zip
An Optional<T> is pod-like if the inner type is.
llvm-svn: 175908
Diffstat (limited to 'llvm/include')
-rw-r--r--llvm/include/llvm/ADT/Optional.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/include/llvm/ADT/Optional.h b/llvm/include/llvm/ADT/Optional.h
index fd1da74bb79..81d73ed8b99 100644
--- a/llvm/include/llvm/ADT/Optional.h
+++ b/llvm/include/llvm/ADT/Optional.h
@@ -142,6 +142,12 @@ template <typename T>
struct simplify_type<Optional<T> >
: public simplify_type<const Optional<T> > {};
+template <typename T> struct isPodLike;
+template <typename T> struct isPodLike<Optional<T> > {
+ // An Optional<T> is pod-like if T is.
+ static const bool value = isPodLike<T>::value;
+};
+
/// \brief Poison comparison between two \c Optional objects. Clients needs to
/// explicitly compare the underlying values and account for empty \c Optional
/// objects.
OpenPOWER on IntegriCloud