LLDB should guarantee that the strings returned by SBAPI methods
live forever. I went through every method that returns a string and made
sure that it was added to the ConstString StringPool before returning if
it wasn't obvious that it was already doing so.
I've also updated the docs to document this behavior.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
LGTM with nit.
lldb/source/API/SBFunction.cpp | ||
---|---|---|
181 | nit: This threw me off, I thought you forgot to create a ConsString but it seems that ConstString has both a AsCString and a GetCString method. It would be good to stay consistent. |
lldb/source/API/SBFunction.cpp | ||
---|---|---|
181 | Yeah, maybe we should try to remove either GetCString or AsCString and be uniform everywhere. Let's plan on doing that later though. |
Comment Actions
Update SBModule::GetUUIDString -- I slightly changed behavior. Now the behavior matches the previous implementation exactly.
nit: This threw me off, I thought you forgot to create a ConsString but it seems that ConstString has both a AsCString and a GetCString method. It would be good to stay consistent.