123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- #pragma once
- #ifdef __GNUC__
- #pragma GCC diagnostic push
- #pragma GCC diagnostic ignored "-Wunused-parameter"
- #endif
- //===- FunctionId.h ---------------------------------------------*- C++ -*-===//
- //
- // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
- // See https://llvm.org/LICENSE.txt for license information.
- // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
- //
- //===----------------------------------------------------------------------===//
- #ifndef LLVM_DEBUGINFO_CODEVIEW_FUNCTIONID_H
- #define LLVM_DEBUGINFO_CODEVIEW_FUNCTIONID_H
- #include <cinttypes>
- namespace llvm {
- namespace codeview {
- class FunctionId {
- public:
- FunctionId() : Index(0) {}
- explicit FunctionId(uint32_t Index) : Index(Index) {}
- uint32_t getIndex() const { return Index; }
- private:
- uint32_t Index;
- };
- inline bool operator==(const FunctionId &A, const FunctionId &B) {
- return A.getIndex() == B.getIndex();
- }
- inline bool operator!=(const FunctionId &A, const FunctionId &B) {
- return A.getIndex() != B.getIndex();
- }
- inline bool operator<(const FunctionId &A, const FunctionId &B) {
- return A.getIndex() < B.getIndex();
- }
- inline bool operator<=(const FunctionId &A, const FunctionId &B) {
- return A.getIndex() <= B.getIndex();
- }
- inline bool operator>(const FunctionId &A, const FunctionId &B) {
- return A.getIndex() > B.getIndex();
- }
- inline bool operator>=(const FunctionId &A, const FunctionId &B) {
- return A.getIndex() >= B.getIndex();
- }
- }
- }
- #endif
- #ifdef __GNUC__
- #pragma GCC diagnostic pop
- #endif
|