<p dir="ltr">Good catch. I'd looked for this case but apparently missed it in the diff. Fission is a dwarf5 feature and so this probably shouldn't work since it relies on forms that are only in dwarf5.</p>
<p dir="ltr">-eric</p>
<div class="gmail_quote">On Nov 14, 2013 2:18 PM, "Robinson, Paul" <<a href="mailto:Paul_Robinson@playstation.sony.com">Paul_Robinson@playstation.sony.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
+; RUN: llc -split-dwarf=Enable -O0 %s -mtriple=x86_64-unknown-linux-gnu -filetype=obj -o %t -dwarf-version=3<br>
<br>
This seems weird, fission with DWARF 3... but of course 4 doesn't<br>
have it either, so it's no less weird than what we have today.<br>
<br>
It's good to have the forms more consistent with the target version<br>
but eventually we might want to be more picky about mix-n-match.<br>
--paulr<br>
<br>
> -----Original Message-----<br>
> From: <a href="mailto:llvm-commits-bounces@cs.uiuc.edu">llvm-commits-bounces@cs.uiuc.edu</a> [mailto:<a href="mailto:llvm-commits-">llvm-commits-</a><br>
> <a href="mailto:bounces@cs.uiuc.edu">bounces@cs.uiuc.edu</a>] On Behalf Of Keith Walker<br>
> Sent: Thursday, November 14, 2013 8:29 AM<br>
> To: <a href="mailto:echristo@gmail.com">echristo@gmail.com</a>; <a href="mailto:kwalker@arm.com">kwalker@arm.com</a><br>
> Cc: <a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>
> Subject: [PATCH] Use the DWARF form DW_FORM_sec_offset or DW_FORM_data4<br>
> depending on the Dwarf version being generated<br>
><br>
> Hi echristo,<br>
><br>
> In Dwarf 3 (and Dwarf 2) attributes whose value are offsets into a<br>
> section use the form DW_FORM_data4 whilst in Dwarf 4 and later they use<br>
> the form DW_FORM_sec_offset.<br>
><br>
> This patch updates the places where such attributes are generated to use<br>
> the appropriate form depending on the Dwarf version.  The DIE entries<br>
> affected have the following tags:<br>
> DW_AT_stmt_list, DW_AT_ranges, DW_AT_location, DW_AT_GNU_pubnames,<br>
> DW_AT_GNU_pubtypes, DW_AT_GNU_addr_base, DW_AT_GNU_ranges_base<br>
><br>
> It also adds a hidden command line option "--dwarf-version=<uint>" to<br>
> llc which allows the version of Dwarf to be generated to override what<br>
> is specified in the metadata;  this makes it possible to update existing<br>
> tests to check the debugging information generated for both Dwarf 4 (the<br>
> default) and Dwarf 3 using the same metadata.<br>
><br>
> <a href="http://llvm-reviews.chandlerc.com/D2180" target="_blank">http://llvm-reviews.chandlerc.com/D2180</a><br>
><br>
> Files:<br>
>   lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp<br>
>   lib/CodeGen/AsmPrinter/DwarfCompileUnit.h<br>
>   lib/CodeGen/AsmPrinter/DIE.cpp<br>
>   lib/CodeGen/AsmPrinter/DwarfDebug.cpp<br>
>   test/DebugInfo/X86/op_deref.ll<br>
>   test/DebugInfo/X86/block-capture.ll<br>
>   test/DebugInfo/X86/DW_AT_stmt_list_sec_offset.ll<br>
>   test/DebugInfo/X86/gnu-public-names.ll<br>
>   test/DebugInfo/X86/fission-cu.ll<br>
>   test/DebugInfo/X86/stmt-list-multiple-compile-units.ll<br>
</blockquote></div>