Add a StringRef conversion function to ConstString.
This will make using llvm and other non-ConstString APIs more convenient.
For demonstration, this change updates Module.cpp.
Paths
| Differential D148175
[lldb] Add `operator StringRef` to ConstString ClosedPublic Authored by kastiglione on Apr 12 2023, 3:06 PM.
Details Summary Add a StringRef conversion function to ConstString. This will make using llvm and other non-ConstString APIs more convenient. For demonstration, this change updates Module.cpp.
Diff Detail
Event TimelineComment Actions I understand that the opposite direction is explicit because actual work is being done. In this direction, it shouldn't affect memory management (since ConstStrings live forever) or performance, so I think this is good (and very convenient!). Comment Actions
I think this is safe and helpful. This revision is now accepted and ready to land.Apr 13 2023, 3:50 PM Comment Actions
As long as this is true, I don't see any pitfalls either. Closed by commit rGce7a54a27c09: [lldb] Add `operator StringRef` to ConstString (authored by kastiglione). · Explain WhyApr 14 2023, 8:08 AM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 513600 lldb/include/lldb/Utility/ConstString.h
lldb/source/Core/Module.cpp
|