[PATCH] D156834: Remove some noisy log messages from showing up in llvm-gsymutil output.
Greg Clayton via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 9 00:40:25 PDT 2023
clayborg updated this revision to Diff 548497.
clayborg added a comment.
Rebase against latest sources.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D156834/new/
https://reviews.llvm.org/D156834
Files:
llvm/lib/DebugInfo/GSYM/DwarfTransformer.cpp
llvm/lib/DebugInfo/GSYM/GsymCreator.cpp
Index: llvm/lib/DebugInfo/GSYM/GsymCreator.cpp
===================================================================
--- llvm/lib/DebugInfo/GSYM/GsymCreator.cpp
+++ llvm/lib/DebugInfo/GSYM/GsymCreator.cpp
@@ -270,11 +270,9 @@
}
} else {
if (Prev.Range.size() == 0 && Curr.Range.contains(Prev.Range.start())) {
- if (!Quiet) {
- OS << "warning: removing symbol:\n"
- << Prev << "\nKeeping:\n"
- << Curr << "\n";
- }
+ // Symbols on macOS don't have address ranges, so if the range
+ // doesn't match and the size is zero, then we replace the empty
+ // symbol function info with the current one.
std::swap(Prev, Curr);
} else {
FinalizedFuncs.emplace_back(std::move(Curr));
Index: llvm/lib/DebugInfo/GSYM/DwarfTransformer.cpp
===================================================================
--- llvm/lib/DebugInfo/GSYM/DwarfTransformer.cpp
+++ llvm/lib/DebugInfo/GSYM/DwarfTransformer.cpp
@@ -221,13 +221,18 @@
// Check that the inlined function is within the any of the range the
// parent InlineInfo. If it isn't remove it!
AddressRange InlineRange(Range.LowPC, Range.HighPC);
- if (parent.Ranges.contains(InlineRange)) {
- II.Ranges.insert(InlineRange);
- } else if (Log) {
- *Log << "error: inlined function DIE at " << HEX32(Die.getOffset())
- << " has a range [" << HEX64(Range.LowPC) << " - "
- << HEX64(Range.HighPC) << ") that isn't contained in any parent "
- << "address ranges, this inline range will be removed.\n";
+ // Check for empty inline range in case inline function was outlined
+ // or has not code
+ if (!InlineRange.empty()) {
+ if (parent.Ranges.contains(InlineRange)) {
+ II.Ranges.insert(InlineRange);
+ } else if (Log) {
+ *Log << "error: inlined function DIE at " << HEX32(Die.getOffset())
+ << " has a range [" << HEX64(Range.LowPC) << " - "
+ << HEX64(Range.HighPC) << ") that isn't contained in any "
+ << "parent address ranges, this inline range will be "
+ "removed.\n";
+ }
}
}
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D156834.548497.patch
Type: text/x-patch
Size: 2341 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230809/425b2239/attachment.bin>
More information about the llvm-commits
mailing list