LLVM 17.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
20#include <optional>
21
22namespace llvm {
23/// A simple null object to allow implicit construction of std::optional<T>
24/// and similar types without having to spell out the specialization's name.
25LLVM_DEPRECATED("Use std::nullopt_t instead", "std::nullopt_t")
26typedef std::nullopt_t NoneType;
27LLVM_DEPRECATED("Use std::nullopt instead.", "std::nullopt")
28inline constexpr std::nullopt_t None = std::nullopt;
29}
30
31#endif
always inline
#define LLVM_DEPRECATED(MSG, FIX)
Definition: Compiler.h:145
A Use represents the edge between a Value definition and its users.
Definition: Use.h:43
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18
std::nullopt_t NoneType
A simple null object to allow implicit construction of std::optional<T> and similar types without hav...
Definition: None.h:26
constexpr std::nullopt_t None
Definition: None.h:28
Definition: BitVector.h:858