LLVM  6.0.0svn
FunctionId.h
Go to the documentation of this file.
1 //===- FunctionId.h ---------------------------------------------*- C++ -*-===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 
10 #ifndef LLVM_DEBUGINFO_CODEVIEW_FUNCTIONID_H
11 #define LLVM_DEBUGINFO_CODEVIEW_FUNCTIONID_H
12 
13 #include <cinttypes>
14 
15 namespace llvm {
16 namespace codeview {
17 
18 class FunctionId {
19 public:
20  FunctionId() : Index(0) {}
21 
22  explicit FunctionId(uint32_t Index) : Index(Index) {}
23 
24  uint32_t getIndex() const { return Index; }
25 
26 private:
27  uint32_t Index;
28 };
29 
30 inline bool operator==(const FunctionId &A, const FunctionId &B) {
31  return A.getIndex() == B.getIndex();
32 }
33 
34 inline bool operator!=(const FunctionId &A, const FunctionId &B) {
35  return A.getIndex() != B.getIndex();
36 }
37 
38 inline bool operator<(const FunctionId &A, const FunctionId &B) {
39  return A.getIndex() < B.getIndex();
40 }
41 
42 inline bool operator<=(const FunctionId &A, const FunctionId &B) {
43  return A.getIndex() <= B.getIndex();
44 }
45 
46 inline bool operator>(const FunctionId &A, const FunctionId &B) {
47  return A.getIndex() > B.getIndex();
48 }
49 
50 inline bool operator>=(const FunctionId &A, const FunctionId &B) {
51  return A.getIndex() >= B.getIndex();
52 }
53 }
54 }
55 
56 #endif
bool operator<=(const FunctionId &A, const FunctionId &B)
Definition: FunctionId.h:42
Compute iterated dominance frontiers using a linear time algorithm.
Definition: AllocatorList.h:24
bool operator!=(const FunctionId &A, const FunctionId &B)
Definition: FunctionId.h:34
bool operator>=(const FunctionId &A, const FunctionId &B)
Definition: FunctionId.h:50
bool operator>(const FunctionId &A, const FunctionId &B)
Definition: FunctionId.h:46
static GCRegistry::Add< OcamlGC > B("ocaml", "ocaml 3.10-compatible GC")
FunctionId(uint32_t Index)
Definition: FunctionId.h:22
bool operator==(const FunctionId &A, const FunctionId &B)
Definition: FunctionId.h:30
bool operator<(const FunctionId &A, const FunctionId &B)
Definition: FunctionId.h:38
uint32_t getIndex() const
Definition: FunctionId.h:24