diff options
author | Alex Langford <alangford@apple.com> | 2023-07-10 13:40:02 -0700 |
---|---|---|
committer | Alex Langford <alangford@apple.com> | 2023-07-11 10:22:02 -0700 |
commit | e7c48ffde1c8137822a1b0a1ba6c4be5b4624aa6 (patch) | |
tree | 17038a285c9dd3bb4812d26d9628c18dc5197f85 /clang/lib/Lex/ModuleMap.cpp | |
parent | 5cd41dc62db71f725d1ae99ddfb9fc55f95b338e (diff) | |
download | llvm-e7c48ffde1c8137822a1b0a1ba6c4be5b4624aa6.zip llvm-e7c48ffde1c8137822a1b0a1ba6c4be5b4624aa6.tar.gz llvm-e7c48ffde1c8137822a1b0a1ba6c4be5b4624aa6.tar.bz2 |
[lldb][NFCI] Avoid construction of temporary std::strings in Variable
A common thing to do is to call `str().c_str()` to get a null-terminated
string out of an existing StringRef. Most of the time this is to be able
to use a printf-style format string. However, llvm::formatv can handle
StringRefs without the need for the additional allocation. Using that
makes more sense.
Differential Revision: https://reviews.llvm.org/D154890
Diffstat (limited to 'clang/lib/Lex/ModuleMap.cpp')
0 files changed, 0 insertions, 0 deletions