diff options
| author | Pirama Arumuga Nainar <pirama@google.com> | 2018-11-10 11:01:22 -0800 |
|---|---|---|
| committer | Alex Tsanis <alextsanisbadlorg@gmail.com> | 2018-11-24 22:00:27 +0000 |
| commit | d1d48b140bafaa8a50107292f5fce95562575765 (patch) | |
| tree | f56a423bb9f6e46190fa3742cfcb73c571b3ebc1 /clang-r344140b/include/llvm/DebugInfo/CodeView/GUID.h | |
| parent | 1be2ab6257915490176d09db0a7307595f7c3021 (diff) | |
Update prebuilt Clang to r344140b.
clang 8.0.4 (based on r344140) from build 5122994.
Bug: http://b/119270185
Test: N/A
Change-Id: Ia74b247af5a54cc671817abd1ab9f08731eabf28
Signed-off-by: Akhil Narang <akhilnarang.1999@gmail.com>
Diffstat (limited to 'clang-r344140b/include/llvm/DebugInfo/CodeView/GUID.h')
| -rw-r--r-- | clang-r344140b/include/llvm/DebugInfo/CodeView/GUID.h | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/clang-r344140b/include/llvm/DebugInfo/CodeView/GUID.h b/clang-r344140b/include/llvm/DebugInfo/CodeView/GUID.h new file mode 100644 index 00000000..a055ce9e --- /dev/null +++ b/clang-r344140b/include/llvm/DebugInfo/CodeView/GUID.h @@ -0,0 +1,55 @@ +//===- GUID.h ---------------------------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#ifndef LLVM_DEBUGINFO_CODEVIEW_GUID_H +#define LLVM_DEBUGINFO_CODEVIEW_GUID_H + +#include <cstdint> +#include <cstring> + +namespace llvm { +class raw_ostream; + +namespace codeview { + +/// This represents the 'GUID' type from windows.h. +struct GUID { + uint8_t Guid[16]; +}; + +inline bool operator==(const GUID &LHS, const GUID &RHS) { + return 0 == ::memcmp(LHS.Guid, RHS.Guid, sizeof(LHS.Guid)); +} + +inline bool operator<(const GUID &LHS, const GUID &RHS) { + return ::memcmp(LHS.Guid, RHS.Guid, sizeof(LHS.Guid)) < 0; +} + +inline bool operator<=(const GUID &LHS, const GUID &RHS) { + return ::memcmp(LHS.Guid, RHS.Guid, sizeof(LHS.Guid)) <= 0; +} + +inline bool operator>(const GUID &LHS, const GUID &RHS) { + return !(LHS <= RHS); +} + +inline bool operator>=(const GUID &LHS, const GUID &RHS) { + return !(LHS < RHS); +} + +inline bool operator!=(const GUID &LHS, const GUID &RHS) { + return !(LHS == RHS); +} + +raw_ostream &operator<<(raw_ostream &OS, const GUID &Guid); + +} // namespace codeview +} // namespace llvm + +#endif |
