Coverage Report

Created: 2019-07-24 05:18

/Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/llvm/include/llvm/DebugInfo/CodeView/GUID.h
Line
Count
Source (jump to first uncovered line)
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
12
#include <cstdint>
13
#include <cstring>
14
15
namespace llvm {
16
class raw_ostream;
17
18
namespace codeview {
19
20
/// This represents the 'GUID' type from windows.h.
21
struct GUID {
22
  uint8_t Guid[16];
23
};
24
25
inline bool operator==(const GUID &LHS, const GUID &RHS) {
26
  return 0 == ::memcmp(LHS.Guid, RHS.Guid, sizeof(LHS.Guid));
27
}
28
29
inline bool operator<(const GUID &LHS, const GUID &RHS) {
30
  return ::memcmp(LHS.Guid, RHS.Guid, sizeof(LHS.Guid)) < 0;
31
}
32
33
0
inline bool operator<=(const GUID &LHS, const GUID &RHS) {
34
0
  return ::memcmp(LHS.Guid, RHS.Guid, sizeof(LHS.Guid)) <= 0;
35
0
}
36
37
0
inline bool operator>(const GUID &LHS, const GUID &RHS) {
38
0
  return !(LHS <= RHS);
39
0
}
40
41
0
inline bool operator>=(const GUID &LHS, const GUID &RHS) {
42
0
  return !(LHS < RHS);
43
0
}
44
45
inline bool operator!=(const GUID &LHS, const GUID &RHS) {
46
  return !(LHS == RHS);
47
}
48
49
raw_ostream &operator<<(raw_ostream &OS, const GUID &Guid);
50
51
} // namespace codeview
52
} // namespace llvm
53
54
#endif