[llvm] [cmake] Add possibility to use ChooseMSVCCRT.cmake when include LLVM library
[llvm-core.git] / include / llvm / DebugInfo / CodeView / FunctionId.h
blobbc102278819cdc7486a8f75b10dff275591a742d
1 //===- FunctionId.h ---------------------------------------------*- 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 //===----------------------------------------------------------------------===//
9 #ifndef LLVM_DEBUGINFO_CODEVIEW_FUNCTIONID_H
10 #define LLVM_DEBUGINFO_CODEVIEW_FUNCTIONID_H
12 #include <cinttypes>
14 namespace llvm {
15 namespace codeview {
17 class FunctionId {
18 public:
19 FunctionId() : Index(0) {}
21 explicit FunctionId(uint32_t Index) : Index(Index) {}
23 uint32_t getIndex() const { return Index; }
25 private:
26 uint32_t Index;
29 inline bool operator==(const FunctionId &A, const FunctionId &B) {
30 return A.getIndex() == B.getIndex();
33 inline bool operator!=(const FunctionId &A, const FunctionId &B) {
34 return A.getIndex() != B.getIndex();
37 inline bool operator<(const FunctionId &A, const FunctionId &B) {
38 return A.getIndex() < B.getIndex();
41 inline bool operator<=(const FunctionId &A, const FunctionId &B) {
42 return A.getIndex() <= B.getIndex();
45 inline bool operator>(const FunctionId &A, const FunctionId &B) {
46 return A.getIndex() > B.getIndex();
49 inline bool operator>=(const FunctionId &A, const FunctionId &B) {
50 return A.getIndex() >= B.getIndex();
55 #endif