16 #ifndef LLVM_ADT_OPTIONAL_H
17 #define LLVM_ADT_OPTIONAL_H
51 new (storage.
buffer)
T(std::forward<T>(y));
56 new (storage.
buffer)
T(std::move(*O));
67 **
this = std::move(y);
69 new (storage.
buffer)
T(std::move(y));
79 *
this = std::move(*O);
86 template<
typename ...ArgTypes>
90 new (storage.
buffer)
T(std::forward<ArgTypes>(
Args)...);
132 explicit operator bool()
const {
return hasVal; }
139 template <
typename U>
144 #if LLVM_HAS_RVALUE_REFERENCE_THIS
148 template <
typename U>
160 template <
typename T,
typename U>
167 template <
typename T,
typename U>
172 template <
typename T,
typename U>
176 return X.hasValue() < Y.hasValue();
179 template <
typename T,
typename U>
184 template <
typename T,
typename U>
189 template <
typename T,
typename U>
214 template <
typename T>
bool operator<(const Optional<T> &
X,
NoneType) {
218 template <
typename T>
bool operator<(NoneType, const Optional<T> &
X) {
222 template <
typename T>
bool operator<=(const Optional<T> &
X,
NoneType) {
226 template <
typename T>
bool operator<=(NoneType, const Optional<T> &
X) {
262 template <
typename T>
bool operator<(const Optional<T> &
X,
const T &
Y) {
266 template <
typename T>
bool operator<(const T &X, const Optional<T> &
Y) {
270 template <
typename T>
bool operator<=(const Optional<T> &
X,
const T &
Y) {
274 template <
typename T>
bool operator<=(const T &X, const Optional<T> &
Y) {
296 #endif // LLVM_ADT_OPTIONAL_H
Optional & operator=(Optional &&O)
const T & operator*() const LLVM_LVALUE_FUNCTION
NoneType
A simple null object to allow implicit construction of Optional<T> and similar types without having to ...
bool operator>(int64_t V1, const APSInt &V2)
constexpr T getValueOr(U &&value) const LLVM_LVALUE_FUNCTION
T & getValue() LLVM_LVALUE_FUNCTION
bool operator>=(int64_t V1, const APSInt &V2)
#define LLVM_LVALUE_FUNCTION
Expands to '&' if ref-qualifiers for *this are supported.
const T * operator->() const
Optional & operator=(const T &y)
const T & getValue() const LLVM_LVALUE_FUNCTION
static Optional create(const T *y)
const T * getPointer() const
constexpr char Args[]
Key for Kernel::Metadata::mArgs.
T & operator*() LLVM_LVALUE_FUNCTION
static GCMetadataPrinterRegistry::Add< ErlangGCPrinter > X("erlang","erlang-compatible garbage collector")
isPodLike - This is a type trait that is used to determine whether a given type can be copied around ...
Optional(Optional< T > &&O)
Optional(const Optional &O)
bool operator!=(uint64_t V1, const APInt &V2)
Optional & operator=(T &&y)
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
static GCMetadataPrinterRegistry::Add< OcamlGCMetadataPrinter > Y("ocaml","ocaml 3.10-compatible collector")
bool operator==(uint64_t V1, const APInt &V2)
void emplace(ArgTypes &&...Args)
Create a new object by constructing it in place with the given arguments.
Optional & operator=(const Optional &O)