aboutsummaryrefslogtreecommitdiff
path: root/clang/unittests/Frontend/CompilerInvocationTest.cpp
diff options
context:
space:
mode:
authorRaphael Isemann <teemperor@gmail.com>2021-05-18 10:30:54 +0200
committerRaphael Isemann <teemperor@gmail.com>2021-05-18 15:45:09 +0200
commit82f248d234a3363886600e239ff86aab4f76090d (patch)
tree1c787e14f579af5137160c5df3fcba034994ad00 /clang/unittests/Frontend/CompilerInvocationTest.cpp
parent3cc39607668d6f942458a37e7a9111294d9373bd (diff)
downloadllvm-82f248d234a3363886600e239ff86aab4f76090d.zip
llvm-82f248d234a3363886600e239ff86aab4f76090d.tar.gz
llvm-82f248d234a3363886600e239ff86aab4f76090d.tar.bz2
[ADT] Remove StringRef::withNullAsEmpty
A long time ago LLDB wanted to start using StringRef instead of C-Strings/ConstString but was blocked by the StringRef(const char *) ctor 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, it seems that the original approach with withNullAsEmpty was never touched again since then and now just exists as a function in StringRef that is only used in a few places in LLDB. I removed the few uses of withNullAsEmpty in D102597 and this patch removes the function itself. Calling the implicit StringRef(const char *) constructor is the preferred way of doing this today. Reviewed By: lattner Differential Revision: https://reviews.llvm.org/D102599
Diffstat (limited to 'clang/unittests/Frontend/CompilerInvocationTest.cpp')
0 files changed, 0 insertions, 0 deletions