LLVM 22.0.0git
Spelling.h
Go to the documentation of this file.
1//===-------------------------------------------------------------- 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#ifndef LLVM_FRONTEND_DIRECTIVE_SPELLING_H
9#define LLVM_FRONTEND_DIRECTIVE_SPELLING_H
10
11#include "llvm/ADT/StringRef.h"
14
15#include <limits>
16#include <tuple>
17
18namespace llvm::directive {
19
21 static constexpr int MaxValue = std::numeric_limits<int>::max();
22 // The default "Version" value in get<Lang><Enum>Name() is 0, include that
23 // in the maximum range.
24 int Min = 0;
26
27 bool operator<(const VersionRange &R) const {
28 return std::tie(Min, Max) < std::tie(R.Min, R.Max);
29 }
30};
31
36
38 unsigned Version);
39
40} // namespace llvm::directive
41
42#endif // LLVM_FRONTEND_DIRECTIVE_SPELLING_H
#define LLVM_ABI
Definition Compiler.h:213
StringRef - Represent a constant reference to a string, i.e.
Definition StringRef.h:55
A range adaptor for a pair of iterators.
This provides a very simple, boring adaptor for a begin and end iterator into a range type.
LLVM_ABI StringRef FindName(llvm::iterator_range< const Spelling * >, unsigned Version)
Definition Spelling.cpp:22
FunctionAddr VTableAddr uintptr_t uintptr_t Version
Definition InstrProf.h:302
VersionRange Versions
Definition Spelling.h:34
static constexpr int MaxValue
Definition Spelling.h:21
bool operator<(const VersionRange &R) const
Definition Spelling.h:27