mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-11-27 15:14:31 +00:00
Remove the UUID::GetAsCString() method which required a buffer to save the
UUID string in; added UUID::GetAsString() which returns the uuid string in a std::string. Updated callers to use the new method. llvm-svn: 181078
This commit is contained in:
1 parent
47752e489e
commit
c16b4af0d7
9 files changed
+58
-61
No files matched your search
@@ -180,15 +180,22 @@ SBModule::GetUUIDString () const
|
||||
{
|
||||
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
|
||||
|
||||
static char uuid_string[80];
|
||||
const char * uuid_c_string = NULL;
|
||||
static char uuid_string_buffer[80];
|
||||
const char *uuid_c_string = NULL;
|
||||
std::string uuid_string;
|
||||
ModuleSP module_sp (GetSP ());
|
||||
if (module_sp)
|
||||
uuid_c_string = (const char *)module_sp->GetUUID().GetAsCString(uuid_string, sizeof(uuid_string));
|
||||
uuid_string = module_sp->GetUUID().GetAsString();
|
||||
|
||||
if (!uuid_string.empty())
|
||||
{
|
||||
strncpy (uuid_string_buffer, uuid_string.c_str(), sizeof (uuid_string_buffer));
|
||||
uuid_c_string = uuid_string_buffer;
|
||||
}
|
||||
|
||||
if (log)
|
||||
{
|
||||
if (uuid_c_string)
|
||||
if (!uuid_string.empty())
|
||||
{
|
||||
StreamString s;
|
||||
module_sp->GetUUID().Dump (&s);
|
||||
|
||||
Reference in new issue
Block a user