LLDB  mainline
Classes | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
lldb_private::UUID Class Reference

#include <UUID.h>

Collaboration diagram for lldb_private::UUID:
Collaboration graph
[legend]

Classes

struct  CvRecordPdb70
 

Public Member Functions

 UUID ()=default
 
void Clear ()
 
void Dump (Stream *s) const
 
llvm::ArrayRef< uint8_t > GetBytes () const
 
 operator bool () const
 
bool IsValid () const
 
std::string GetAsString (llvm::StringRef separator="-") const
 
bool SetFromStringRef (llvm::StringRef str)
 
bool SetFromOptionalStringRef (llvm::StringRef str)
 

Static Public Member Functions

static UUID fromCvRecord (CvRecordPdb70 debug_info)
 Create a UUID from CvRecordPdb70. More...
 
static UUID fromData (const void *bytes, uint32_t num_bytes)
 Creates a UUID from the data pointed to by the bytes argument. More...
 
static UUID fromData (llvm::ArrayRef< uint8_t > bytes)
 Creates a uuid from the data pointed to by the bytes argument. More...
 
static UUID fromOptionalData (const void *bytes, uint32_t num_bytes)
 Creates a UUID from the data pointed to by the bytes argument. More...
 
static UUID fromOptionalData (llvm::ArrayRef< uint8_t > bytes)
 Creates a UUID from the data pointed to by the bytes argument. More...
 
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. More...
 

Private Member Functions

 UUID (llvm::ArrayRef< uint8_t > bytes)
 

Private Attributes

llvm::SmallVector< uint8_t, 20 > m_bytes
 

Friends

bool operator== (const UUID &LHS, const UUID &RHS)
 
bool operator!= (const UUID &LHS, const UUID &RHS)
 
bool operator< (const UUID &LHS, const UUID &RHS)
 
bool operator<= (const UUID &LHS, const UUID &RHS)
 
bool operator> (const UUID &LHS, const UUID &RHS)
 
bool operator>= (const UUID &LHS, const UUID &RHS)
 

Detailed Description

Definition at line 23 of file UUID.h.

Constructor & Destructor Documentation

◆ UUID() [1/2]

lldb_private::UUID::UUID ( )
default

Referenced by fromData(), and fromOptionalData().

◆ UUID() [2/2]

lldb_private::UUID::UUID ( llvm::ArrayRef< uint8_t >  bytes)
inlineprivate

Definition at line 106 of file UUID.h.

Member Function Documentation

◆ Clear()

void lldb_private::UUID::Clear ( )
inline

◆ DecodeUUIDBytesFromString()

llvm::StringRef UUID::DecodeUUIDBytesFromString ( llvm::StringRef  str,
llvm::SmallVectorImpl< uint8_t > &  uuid_bytes 
)
static

Decode as many UUID bytes as possible from the C string cstr.

Parameters
[in]strAn llvm::StringRef that points at a UUID string value (no leading spaces). The string must contain only hex characters and optionally can contain the '-' sepearators.
[in]uuid_bytesA buffer of bytes that will contain a full or partially decoded UUID.
Returns
The original string, with all decoded bytes removed.

Definition at line 73 of file UUID.cpp.

References xdigit_to_int().

Referenced by SetFromStringRef().

◆ Dump()

void UUID::Dump ( Stream s) const

◆ fromCvRecord()

UUID UUID::fromCvRecord ( UUID::CvRecordPdb70  debug_info)
static

◆ fromData() [1/2]

static UUID lldb_private::UUID::fromData ( const void *  bytes,
uint32_t  num_bytes 
)
inlinestatic

Creates a UUID from the data pointed to by the bytes argument.

No special significance is attached to any of the values.

Definition at line 45 of file UUID.h.

References UUID().

Referenced by parseModuleId(), and SetFromStringRef().

◆ fromData() [2/2]

static UUID lldb_private::UUID::fromData ( llvm::ArrayRef< uint8_t >  bytes)
inlinestatic

Creates a uuid from the data pointed to by the bytes argument.

No special significance is attached to any of the values.

Definition at line 53 of file UUID.h.

References UUID().

◆ fromOptionalData() [1/2]

static UUID lldb_private::UUID::fromOptionalData ( const void *  bytes,
uint32_t  num_bytes 
)
inlinestatic

Creates a UUID from the data pointed to by the bytes argument.

Data consisting purely of zero bytes is treated as an invalid UUID.

Definition at line 57 of file UUID.h.

References UUID().

Referenced by fromCvRecord(), and lldb_private::minidump::MinidumpParser::GetModuleUUID().

◆ fromOptionalData() [2/2]

static UUID lldb_private::UUID::fromOptionalData ( llvm::ArrayRef< uint8_t >  bytes)
inlinestatic

Creates a UUID from the data pointed to by the bytes argument.

Data consisting purely of zero bytes is treated as an invalid UUID.

Definition at line 66 of file UUID.h.

References UUID().

◆ GetAsString()

std::string UUID::GetAsString ( llvm::StringRef  separator = "-") const

◆ GetBytes()

llvm::ArrayRef<uint8_t> lldb_private::UUID::GetBytes ( ) const
inline

◆ IsValid()

bool lldb_private::UUID::IsValid ( ) const
inline

◆ operator bool()

lldb_private::UUID::operator bool ( ) const
inlineexplicit

Definition at line 78 of file UUID.h.

References IsValid().

◆ SetFromOptionalStringRef()

bool UUID::SetFromOptionalStringRef ( llvm::StringRef  str)

Definition at line 114 of file UUID.cpp.

References Clear(), m_bytes, and SetFromStringRef().

◆ SetFromStringRef()

bool UUID::SetFromStringRef ( llvm::StringRef  str)

Friends And Related Function Documentation

◆ operator!=

bool operator!= ( const UUID LHS,
const UUID RHS 
)
friend

Definition at line 115 of file UUID.h.

◆ operator<

bool operator< ( const UUID LHS,
const UUID RHS 
)
friend

Definition at line 118 of file UUID.h.

◆ operator<=

bool operator<= ( const UUID LHS,
const UUID RHS 
)
friend

Definition at line 121 of file UUID.h.

◆ operator==

bool operator== ( const UUID LHS,
const UUID RHS 
)
friend

Definition at line 112 of file UUID.h.

◆ operator>

bool operator> ( const UUID LHS,
const UUID RHS 
)
friend

Definition at line 124 of file UUID.h.

◆ operator>=

bool operator>= ( const UUID LHS,
const UUID RHS 
)
friend

Definition at line 125 of file UUID.h.

Member Data Documentation

◆ m_bytes

llvm::SmallVector<uint8_t, 20> lldb_private::UUID::m_bytes
private

Definition at line 110 of file UUID.h.

Referenced by Clear(), GetBytes(), IsValid(), and SetFromOptionalStringRef().


The documentation for this class was generated from the following files: