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 namespace llvm {
20 /// A simple null object to allow implicit construction of Optional<T>
21 /// and similar types without having to spell out the specialization's name.
22 // (constant value 1 in an attempt to workaround MSVC build issue... )
23 enum class NoneType { None = 1 };
25 }
26 
27 #endif
llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18
llvm::None
const NoneType None
Definition: None.h:24
llvm::NoneType::None
@ None
llvm::NoneType
NoneType
A simple null object to allow implicit construction of Optional<T> and similar types without having t...
Definition: None.h:23