[PATCH] D44384: [DEBUGINFO] Add -no-dwarf-debug-ranges option.

David Blaikie via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 12 12:46:20 PDT 2018


dblaikie added inline comments.


================
Comment at: test/DebugInfo/X86/no_debug_ranges.ll:1-2
+; RUN: llc -filetype=asm -mtriple=x86_64-pc-linux-gnu < %s -o - -dwarf-version=2 -no-dwarf-ranges-section | FileCheck %s --check-prefix=DISABLED
+; RUN: llc -filetype=asm -mtriple=x86_64-pc-linux-gnu < %s -o - -dwarf-version=2 | FileCheck %s
+
----------------
Usually debug info is tested through llvm-dwarfdump, but given the need to test for specific sections being named, testing the assembly directly's probably fine here.


================
Comment at: test/DebugInfo/X86/no_debug_ranges.ll:4
+
+; DISABLED-NOT:  {{DW_AT_ranges|.debug_ranges}}
+; DISABLED:      .section .debug_info
----------------
probably check for only .debug_ranges here? (since it's outside the debug_info section, so any mention of DW_AT_ranges wouldn't be too relevant (short of the abbrev section, but no need to check for that when you're checking for the contents of debug_info anyway, I think))


================
Comment at: test/DebugInfo/X86/no_debug_ranges.ll:6
+; DISABLED:      .section .debug_info
+; DISABLED-NOT:  {{DW_AT_ranges|.debug_ranges}}
+; DISABLED:      .quad .Lfunc_begin0 # DW_AT_low_pc
----------------
probably replace ".debug_ranges" with ".section" here? (ie: make sure the low/high pc you're checking for is in the debug_info section, and make sure that section doesn't include a DW_AT_ranges)


Repository:
  rL LLVM

https://reviews.llvm.org/D44384





More information about the llvm-commits mailing list