[llvm] [DebugInfo] DWARFFormValue use formatv instead of format (PR #180498)
David Spickett via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 9 05:50:56 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();
----------------
DavidSpickett wrote:
While you're here, add a blank line after this one to make it clear there's only one `Msg +=` in the `if`.
https://github.com/llvm/llvm-project/pull/180498
More information about the llvm-commits
mailing list