Modernize UUID class
Instead of a separate GetBytes + GetByteSize methods I introduce a single GetBytes method returning an ArrayRef. This is NFC cleanup now, but it should make handling arbitrarily-sized UUIDs cleaner, should we choose to go that way. I also took the opportunity to add some unit tests for this class. llvm-svn: 335244
This commit is contained in:
@@ -82,11 +82,11 @@ void SBModuleSpec::SetTriple(const char *triple) {
|
||||
}
|
||||
|
||||
const uint8_t *SBModuleSpec::GetUUIDBytes() {
|
||||
return (const uint8_t *)m_opaque_ap->GetUUID().GetBytes();
|
||||
return m_opaque_ap->GetUUID().GetBytes().data();
|
||||
}
|
||||
|
||||
size_t SBModuleSpec::GetUUIDLength() {
|
||||
return m_opaque_ap->GetUUID().GetByteSize();
|
||||
return m_opaque_ap->GetUUID().GetBytes().size();
|
||||
}
|
||||
|
||||
bool SBModuleSpec::SetUUIDBytes(const uint8_t *uuid, size_t uuid_len) {
|
||||
|
||||
Reference in New Issue
Block a user