diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/DebugInfo/CodeView/GUID.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/include/llvm/DebugInfo/CodeView/GUID.h b/include/llvm/DebugInfo/CodeView/GUID.h index 0914afaaa947..a055ce9e2e45 100644 --- a/include/llvm/DebugInfo/CodeView/GUID.h +++ b/include/llvm/DebugInfo/CodeView/GUID.h @@ -27,6 +27,26 @@ 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 |