Remove custom implementations of max/min in StringRef that was originally added to...
[oota-llvm.git] / include / llvm / ADT / Optional.h
index 81d73ed8b99754250e170a76a389e4424ace2bd3..ae8344da76a625d48663891c52fbef4dd134f634 100644 (file)
 #define LLVM_ADT_OPTIONAL_H
 
 #include "llvm/ADT/None.h"
-#include "llvm/Support/Compiler.h"
 #include "llvm/Support/AlignOf.h"
+#include "llvm/Support/Compiler.h"
 #include <cassert>
-
-#if LLVM_HAS_RVALUE_REFERENCES
 #include <utility>
-#endif
 
 namespace llvm {
 
@@ -42,7 +39,6 @@ public:
       new (storage.buffer) T(*O);
   }
 
-#if LLVM_HAS_RVALUE_REFERENCES
   Optional(T &&y) : hasVal(true) {
     new (storage.buffer) T(std::forward<T>(y));
   }
@@ -70,7 +66,6 @@ public:
     }
     return *this;
   }
-#endif
 
   static inline Optional create(const T* y) {
     return y ? Optional(*y) : Optional();
@@ -128,20 +123,6 @@ public:
 #endif
 };
 
-template<typename T> struct simplify_type;
-
-template <typename T>
-struct simplify_type<const Optional<T> > {
-  typedef const T* SimpleType;
-  static SimpleType getSimplifiedValue(const Optional<T> &Val) {
-    return Val.getPointer();
-  }
-};
-
-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.