LLVM  16.0.0git
None.h
Go to the documentation of this file.
1 //===-- None.h - Simple null value for implicit construction ------*- C++ -*-=//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 ///
9 /// \file
10 /// This file provides None, an enumerator for use in implicit constructors
11 /// of various (usually templated) types to make such construction more
12 /// terse.
13 ///
14 //===----------------------------------------------------------------------===//
15 
16 #ifndef LLVM_ADT_NONE_H
17 #define LLVM_ADT_NONE_H
18 
19 #include "llvm/Support/Compiler.h"
20 #include <optional>
21 
22 namespace llvm {
23 /// A simple null object to allow implicit construction of Optional<T>
24 /// and similar types without having to spell out the specialization's name.
25 LLVM_DEPRECATED("Use std::nullopt_t instead", "std::nullopt_t")
26 typedef std::nullopt_t NoneType;
27 inline constexpr std::nullopt_t None = std::nullopt;
28 }
29 
30 #endif
llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18
LLVM_DEPRECATED
#define LLVM_DEPRECATED(MSG, FIX)
Definition: Compiler.h:145
inline
into xmm2 addss xmm2 xmm1 xmm3 addss xmm3 movaps xmm0 unpcklps xmm0 ret seems silly when it could just be one addps Expand libm rounding functions inline
Definition: README-SSE.txt:72
Compiler.h
llvm::NoneType
std::nullopt_t NoneType
A simple null object to allow implicit construction of Optional<T> and similar types without having t...
Definition: None.h:26
std
Definition: BitVector.h:851
llvm::None
constexpr std::nullopt_t None
Definition: None.h:27