[llvm][DebugInfo] Use formatv in LVDWARFReader#192011
Merged
Conversation
This relates to llvm#35980.
Member
|
@llvm/pr-subscribers-debuginfo Author: Konrad Kleine (kwk) ChangesThis relates to #35980. Full diff: https://github.com/llvm/llvm-project/pull/192011.diff 1 Files Affected:
diff --git a/llvm/lib/DebugInfo/LogicalView/Readers/LVDWARFReader.cpp b/llvm/lib/DebugInfo/LogicalView/Readers/LVDWARFReader.cpp
index 772d821dcda81..ca642ef421f60 100644
--- a/llvm/lib/DebugInfo/LogicalView/Readers/LVDWARFReader.cpp
+++ b/llvm/lib/DebugInfo/LogicalView/Readers/LVDWARFReader.cpp
@@ -210,7 +210,7 @@ void LVDWARFReader::processOneAttribute(const DWARFDie &Die,
FoundLowPC = false;
// We are dealing with an index into the .debug_addr section.
LLVM_DEBUG({
- dbgs() << format("indexed (%8.8x) address = ", (uint32_t)UValue);
+ dbgs() << formatv("indexed ({0:x-8}) address = ", (uint32_t)UValue);
});
}
}
@@ -263,8 +263,8 @@ void LVDWARFReader::processOneAttribute(const DWARFDie &Die,
if (!RangesOrError) {
LLVM_DEBUG({
std::string TheError(toString(RangesOrError.takeError()));
- dbgs() << format("error decoding address ranges = ",
- TheError.c_str());
+ dbgs() << formatv("error decoding address ranges = {0}",
+ TheError.c_str());
});
consumeError(RangesOrError.takeError());
break;
|
This was referenced Apr 14, 2026
This was referenced Apr 14, 2026
Comment on lines
+265
to
+267
| std::string TheError(toString(RangesOrError.takeError())); | ||
| dbgs() << format("error decoding address ranges = ", | ||
| TheError.c_str()); | ||
| dbgs() << formatv("error decoding address ranges = {0}", | ||
| TheError.c_str()); |
Contributor
There was a problem hiding this comment.
This could use fmt_consume(RangesOrError.takeError())
DavidSpickett
approved these changes
Apr 14, 2026
Collaborator
DavidSpickett
left a comment
There was a problem hiding this comment.
LGTM assuming you clean up the TheError part.
🐧 Linux x64 Test Results
✅ The build succeeded and all tests passed. |
🪟 Windows x64 Test Results
✅ The build succeeded and all tests passed. |
alexfh
pushed a commit
to alexfh/llvm-project
that referenced
this pull request
Apr 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This relates to #35980.
Here are all independent PRs that deal with replacing
formatwithformatvinllvm/lib/DebugInfo: