summaryrefslogtreecommitdiffstats
path: root/lldb/source/API/SBModuleSpec.cpp
diff options
context:
space:
mode:
authorPavel Labath <labath@google.com>2018-06-21 15:07:43 +0000
committerPavel Labath <labath@google.com>2018-06-21 15:07:43 +0000
commit470b286ee5669019a83b2e2ffae845ee44369fbf (patch)
tree6bb572eb8d9527ee580308d25363a284a0330efa /lldb/source/API/SBModuleSpec.cpp
parent084d360f6984df29d0ea2bdf8fea1f1d97de2858 (diff)
downloadbcm5719-llvm-470b286ee5669019a83b2e2ffae845ee44369fbf.tar.gz
bcm5719-llvm-470b286ee5669019a83b2e2ffae845ee44369fbf.zip
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
Diffstat (limited to 'lldb/source/API/SBModuleSpec.cpp')
-rw-r--r--lldb/source/API/SBModuleSpec.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lldb/source/API/SBModuleSpec.cpp b/lldb/source/API/SBModuleSpec.cpp
index 89e8bef91bf..0e6e7c9b0b9 100644
--- a/lldb/source/API/SBModuleSpec.cpp
+++ b/lldb/source/API/SBModuleSpec.cpp
@@ -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) {
OpenPOWER on IntegriCloud