Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-05-10 08:43:39

0001 //===- GUID.h ---------------------------------------------------*- C++ -*-===//
0002 //
0003 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
0004 // See https://llvm.org/LICENSE.txt for license information.
0005 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
0006 //
0007 //===----------------------------------------------------------------------===//
0008 
0009 #ifndef LLVM_DEBUGINFO_CODEVIEW_GUID_H
0010 #define LLVM_DEBUGINFO_CODEVIEW_GUID_H
0011 
0012 #include <cstdint>
0013 #include <cstring>
0014 
0015 namespace llvm {
0016 class raw_ostream;
0017 
0018 namespace codeview {
0019 
0020 /// This represents the 'GUID' type from windows.h.
0021 struct GUID {
0022   uint8_t Guid[16];
0023 };
0024 
0025 inline bool operator==(const GUID &LHS, const GUID &RHS) {
0026   return 0 == ::memcmp(LHS.Guid, RHS.Guid, sizeof(LHS.Guid));
0027 }
0028 
0029 inline bool operator<(const GUID &LHS, const GUID &RHS) {
0030   return ::memcmp(LHS.Guid, RHS.Guid, sizeof(LHS.Guid)) < 0;
0031 }
0032 
0033 inline bool operator<=(const GUID &LHS, const GUID &RHS) {
0034   return ::memcmp(LHS.Guid, RHS.Guid, sizeof(LHS.Guid)) <= 0;
0035 }
0036 
0037 inline bool operator>(const GUID &LHS, const GUID &RHS) {
0038   return !(LHS <= RHS);
0039 }
0040 
0041 inline bool operator>=(const GUID &LHS, const GUID &RHS) {
0042   return !(LHS < RHS);
0043 }
0044 
0045 inline bool operator!=(const GUID &LHS, const GUID &RHS) {
0046   return !(LHS == RHS);
0047 }
0048 
0049 raw_ostream &operator<<(raw_ostream &OS, const GUID &Guid);
0050 
0051 } // namespace codeview
0052 } // namespace llvm
0053 
0054 #endif