forked from OSchip/llvm-project
![]() A long time ago LLDB wanted to start using StringRef instead of C-Strings/ConstString but was blocked by the fact that the StringRef constructor that takes a C-string was asserting that the C-string isn't a nullptr. To workaround this, D24697 introduced a special function called `withNullAsEmpty` and that's what LLDB (and only LLDB) started to use to build StringRefs from C-strings. A bit later it seems that `withNullAsEmpty` was declared too awkward to use and instead the assert in the StringRef constructor got removed (see D24904). The rest of LLDB was then converted to StringRef by just calling the now perfectly usable implicit constructor. However, all the calls to `withNullAsEmpty` just remained and are now just strange artefacts in the code base that just look out of place. It's also curiously a LLDB-exclusive function and no other project ever called it since it's introduction half a decade ago. This patch removes all uses of `withNullAsEmpty`. The follow up will be to remove the function from StringRef. Reviewed By: JDevlieghere Differential Revision: https://reviews.llvm.org/D102597 |
||
---|---|---|
.. | ||
Breakpoint.cpp | ||
BreakpointID.cpp | ||
BreakpointIDList.cpp | ||
BreakpointList.cpp | ||
BreakpointLocation.cpp | ||
BreakpointLocationCollection.cpp | ||
BreakpointLocationList.cpp | ||
BreakpointName.cpp | ||
BreakpointOptions.cpp | ||
BreakpointPrecondition.cpp | ||
BreakpointResolver.cpp | ||
BreakpointResolverAddress.cpp | ||
BreakpointResolverFileLine.cpp | ||
BreakpointResolverFileRegex.cpp | ||
BreakpointResolverName.cpp | ||
BreakpointResolverScripted.cpp | ||
BreakpointSite.cpp | ||
BreakpointSiteList.cpp | ||
CMakeLists.txt | ||
Stoppoint.cpp | ||
StoppointCallbackContext.cpp | ||
StoppointSite.cpp | ||
Watchpoint.cpp | ||
WatchpointList.cpp | ||
WatchpointOptions.cpp |