From f73363f1dd94996356cefbf24388f561891acf0b Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Sat, 28 Jul 2018 11:09:23 +0000 Subject: Vendor import of lldb trunk r338150: https://llvm.org/svn/llvm-project/lldb/trunk@338150 --- source/API/SBModuleSpec.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'source/API/SBModuleSpec.cpp') diff --git a/source/API/SBModuleSpec.cpp b/source/API/SBModuleSpec.cpp index a1c08865c6a4..afabd9ace2b9 100644 --- a/source/API/SBModuleSpec.cpp +++ b/source/API/SBModuleSpec.cpp @@ -70,9 +70,9 @@ void SBModuleSpec::SetObjectName(const char *name) { const char *SBModuleSpec::GetTriple() { std::string triple(m_opaque_ap->GetArchitecture().GetTriple().str()); - // Unique the string so we don't run into ownership issues since - // the const strings put the string into the string pool once and - // the strings never comes out + // Unique the string so we don't run into ownership issues since the const + // strings put the string into the string pool once and the strings never + // comes out ConstString const_triple(triple.c_str()); return const_triple.GetCString(); } @@ -82,15 +82,16 @@ 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) { - return m_opaque_ap->GetUUID().SetBytes(uuid, uuid_len); + m_opaque_ap->GetUUID() = UUID::fromOptionalData(uuid, uuid_len); + return m_opaque_ap->GetUUID().IsValid(); } bool SBModuleSpec::GetDescription(lldb::SBStream &description) { -- cgit v1.3