LLVM 22.0.0git
GUID.h
Go to the documentation of this file.
1//===- GUID.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//===----------------------------------------------------------------------===//
8
9#ifndef LLVM_DEBUGINFO_CODEVIEW_GUID_H
10#define LLVM_DEBUGINFO_CODEVIEW_GUID_H
11
13#include <cstdint>
14#include <cstring>
15
16namespace llvm {
17class raw_ostream;
18
19namespace codeview {
20
21/// This represents the 'GUID' type from windows.h.
22struct GUID {
24};
25
26inline bool operator==(const GUID &LHS, const GUID &RHS) {
27 return 0 == ::memcmp(LHS.Guid, RHS.Guid, sizeof(LHS.Guid));
28}
29
30inline bool operator<(const GUID &LHS, const GUID &RHS) {
31 return ::memcmp(LHS.Guid, RHS.Guid, sizeof(LHS.Guid)) < 0;
32}
33
34inline bool operator<=(const GUID &LHS, const GUID &RHS) {
35 return ::memcmp(LHS.Guid, RHS.Guid, sizeof(LHS.Guid)) <= 0;
36}
37
38inline bool operator>(const GUID &LHS, const GUID &RHS) {
39 return !(LHS <= RHS);
40}
41
42inline bool operator>=(const GUID &LHS, const GUID &RHS) {
43 return !(LHS < RHS);
44}
45
46inline bool operator!=(const GUID &LHS, const GUID &RHS) {
47 return !(LHS == RHS);
48}
49
51
52} // namespace codeview
53} // namespace llvm
54
55#endif
#define LLVM_ABI
Definition: Compiler.h:213
Merge contiguous icmps into a memcmp
Definition: MergeICmps.cpp:915
raw_pwrite_stream & OS
Value * RHS
Value * LHS
This class implements an extremely fast bulk output stream that can only output to a stream.
Definition: raw_ostream.h:53
bool operator!=(const FunctionId &A, const FunctionId &B)
Definition: FunctionId.h:33
bool operator>(const FunctionId &A, const FunctionId &B)
Definition: FunctionId.h:45
bool operator>=(const FunctionId &A, const FunctionId &B)
Definition: FunctionId.h:49
bool operator<(const FunctionId &A, const FunctionId &B)
Definition: FunctionId.h:37
bool operator<=(const FunctionId &A, const FunctionId &B)
Definition: FunctionId.h:41
LLVM_ABI raw_ostream & operator<<(raw_ostream &OS, const GUID &Guid)
Definition: Formatters.cpp:57
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18
bool operator==(const AddressRangeValuePair &LHS, const AddressRangeValuePair &RHS)
This represents the 'GUID' type from windows.h.
Definition: GUID.h:22
uint8_t Guid[16]
Definition: GUID.h:23