Attaching debug information should ideally not change the rest of the
binary. This works best when the debug information sections come last in
the file. See also the discussion in https://reviews.llvm.org/D29315 or
r197922 or rdar://15623193
This means that we should output the debug information after calling the
targets EmitEndOfAsmFile.
@rafael: Could you please look at the changes to test/DebugInfo/X86/arange-and-stub.ll. This patch moves ".section .data.DW.ref.foo,"aGw",@progbits,DW.ref.foo,comdat" from the end of the file to before the debug info which "CHECK: .data" catches unitentionally I think.
Is this supposed to mean "(The) Handler's" or "Handles", or can I just not parse that sentence? ;-)