Skip to content
Commit f1be855a authored by Greg Clayton's avatar Greg Clayton
Browse files

Fixed SBModule::GetUUIDString() to not use a static character buffer.

Rules for returning "const char *" from functions in the public lldb::SB* API are that you must constify the string using "ConstString(cstr).GetCString()" and return that. This puts the string into a string pool that never goes away. This is only when there is nothing that can hold onto the string. It is OK to specify that a string value lives as long as its SB class counterpart, but this should be made clear in the API if this is done. Many classes already constify their strings (symbol mangled and demangled names, variable names, type names, etc), so be sure to verify you string isn't already constified before you re-constify it. It won't do any harm to re-constify it, it will just cause you a little performance by having to rehash the string.

llvm-svn: 228867
parent c47edb51
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment