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
23 KiB
23 KiB