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:
Pavel Labath
2018-06-21 15:07:43 +00:00
parent 084d360f69
commit 470b286ee5
7 changed files with 57 additions and 26 deletions

View File

@@ -144,7 +144,7 @@ const uint8_t *SBModule::GetUUIDBytes() const {
const uint8_t *uuid_bytes = NULL;
ModuleSP module_sp(GetSP());
if (module_sp)
uuid_bytes = (const uint8_t *)module_sp->GetUUID().GetBytes();
uuid_bytes = module_sp->GetUUID().GetBytes().data();
if (log) {
if (uuid_bytes) {