9#ifndef LLDB_UTILITY_UUID_H
10#define LLDB_UTILITY_UUID_H
12#include "llvm/ADT/ArrayRef.h"
13#include "llvm/ADT/StringRef.h"
14#include "llvm/Support/Endian.h"
32 if (llvm::all_of(
m_bytes, [](uint8_t b) {
return b == 0; })) {
41 llvm::support::ulittle32_t
Data1;
42 llvm::support::ulittle16_t
Data2;
43 llvm::support::ulittle16_t
Data3;
46 llvm::support::ulittle32_t
Age;
54 UUID(
const void *bytes, uint32_t num_bytes) {
58 =
UUID(llvm::ArrayRef<uint8_t>(
reinterpret_cast<const uint8_t *
>(bytes),
68 explicit operator bool()
const {
return IsValid(); }
71 std::string
GetAsString(llvm::StringRef separator =
"-")
const;
87 static llvm::StringRef
100 return !(LHS == RHS);
A stream class that can stream formatted output to a file.
bool SetFromStringRef(llvm::StringRef str)
void Dump(Stream &s) const
friend bool operator!=(const UUID &LHS, const UUID &RHS)
friend bool operator==(const UUID &LHS, const UUID &RHS)
llvm::ArrayRef< uint8_t > GetBytes() const
friend bool operator<(const UUID &LHS, const UUID &RHS)
std::string GetAsString(llvm::StringRef separator="-") const
friend bool operator<=(const UUID &LHS, const UUID &RHS)
llvm::SmallVector< uint8_t, 20 > m_bytes
UUID(llvm::ArrayRef< uint8_t > bytes)
Creates a uuid from the data pointed to by the bytes argument.
friend bool operator>(const UUID &LHS, const UUID &RHS)
friend bool operator>=(const UUID &LHS, const UUID &RHS)
UUID(const void *bytes, uint32_t num_bytes)
Creates a UUID from the data pointed to by the bytes argument.
static llvm::StringRef DecodeUUIDBytesFromString(llvm::StringRef str, llvm::SmallVectorImpl< uint8_t > &uuid_bytes)
Decode as many UUID bytes as possible from the C string cstr.
A class that represents a running process on the host machine.
llvm::support::ulittle16_t Data2
llvm::support::ulittle32_t Data1
llvm::support::ulittle16_t Data3
struct lldb_private::UUID::CvRecordPdb70::@41 Uuid
llvm::support::ulittle32_t Age