[PATCH] D53353: llvm-dwarfdump --diff should not print DW_AT_ranges
Jonas Devlieghere via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 19 11:00:02 PDT 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rL344794: [dwarfdump] Hide ranges in diff-mode. (authored by JDevlieghere, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D53353?vs=169940&id=170218#toc
Repository:
rL LLVM
https://reviews.llvm.org/D53353
Files:
llvm/trunk/lib/DebugInfo/DWARF/DWARFDie.cpp
llvm/trunk/test/DebugInfo/X86/dwarfdump-ranges-unrelocated.s
Index: llvm/trunk/test/DebugInfo/X86/dwarfdump-ranges-unrelocated.s
===================================================================
--- llvm/trunk/test/DebugInfo/X86/dwarfdump-ranges-unrelocated.s
+++ llvm/trunk/test/DebugInfo/X86/dwarfdump-ranges-unrelocated.s
@@ -21,6 +21,16 @@
# BRIEF-NEXT: [0x0000000000000000, 0x0000000000000002)
# BRIEF-NEXT: [0x0000000000000000, 0x0000000000000003))
+# RUN: llvm-dwarfdump -diff %t | FileCheck %s --check-prefix=DIFF
+# DIFF: DW_TAG_compile_unit
+# DIFF-NEXT: DW_AT_producer ()
+# DIFF-NEXT: DW_AT_language (DW_LANG_C_plus_plus)
+# DIFF-NEXT: DW_AT_name ()
+# DIFF-NEXT: DW_AT_stmt_list ()
+# DIFF-NEXT: DW_AT_comp_dir ()
+# DIFF-NEXT: DW_AT_low_pc ()
+# DIFF-NEXT: DW_AT_ranges ()
+
## Asm code for testcase is a reduced and modified output from next
## invocation and source:
# clang test.cpp -S -o test.s -gmlt -ffunction-sections
Index: llvm/trunk/lib/DebugInfo/DWARF/DWARFDie.cpp
===================================================================
--- llvm/trunk/lib/DebugInfo/DWARF/DWARFDie.cpp
+++ llvm/trunk/lib/DebugInfo/DWARF/DWARFDie.cpp
@@ -59,12 +59,14 @@
const DWARFAddressRangesVector &Ranges,
unsigned AddressSize, unsigned Indent,
const DIDumpOptions &DumpOpts) {
+ if (!DumpOpts.ShowAddresses)
+ return;
+
ArrayRef<SectionName> SectionNames;
if (DumpOpts.Verbose)
SectionNames = Obj.getSectionNames();
for (const DWARFAddressRange &R : Ranges) {
-
OS << '\n';
OS.indent(Indent);
R.dump(OS, AddressSize);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D53353.170218.patch
Type: text/x-patch
Size: 1584 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181019/8120d505/attachment.bin>
More information about the llvm-commits
mailing list