X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=include%2Fllvm%2FADT%2FOptional.h;h=ae8344da76a625d48663891c52fbef4dd134f634;hb=e88b79628563d1c6a6e85e87c542e715c11dd173;hp=81d73ed8b99754250e170a76a389e4424ace2bd3;hpb=70c808f5b7e1d9eaa3de872e162a25e956d4777e;p=oota-llvm.git diff --git a/include/llvm/ADT/Optional.h b/include/llvm/ADT/Optional.h index 81d73ed8b99..ae8344da76a 100644 --- a/include/llvm/ADT/Optional.h +++ b/include/llvm/ADT/Optional.h @@ -17,13 +17,10 @@ #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 - -#if LLVM_HAS_RVALUE_REFERENCES #include -#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(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 struct simplify_type; - -template -struct simplify_type > { - typedef const T* SimpleType; - static SimpleType getSimplifiedValue(const Optional &Val) { - return Val.getPointer(); - } -}; - -template -struct simplify_type > - : public simplify_type > {}; - template struct isPodLike; template struct isPodLike > { // An Optional is pod-like if T is.