[llvm] [DebugInfo] DWARFFormValue use formatv instead of format (PR #180498)
Konrad Kleine via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 9 06:51:51 PST 2026
================
@@ -623,10 +629,11 @@ Expected<const char *> DWARFFormValue::getAsCString() const {
return Str;
std::string Msg = FormEncodingString(Form).str();
if (Index)
- Msg += (" uses index " + Twine(*Index) + ", but the referenced string").str();
- Msg += (" offset " + Twine(Offset) + " is beyond " +
- (IsDebugLineString ? ".debug_line_str" : ".debug_str") + " bounds")
+ Msg += formatv(" uses index {0}, but the referenced string", *Index).str();
----------------
kwk wrote:
This caused me a headache because when reformatting I accidentally pulled in everything until I realized what I've done. So adding the newline is probably a good idea. [09a181b](https://github.com/llvm/llvm-project/pull/180498/commits/09a181bfe2024e1b764cf1ff95cd91ace140d849)
https://github.com/llvm/llvm-project/pull/180498
More information about the llvm-commits
mailing list