llvm/test/MC/ELF
Ulrich Weigand 4df4bccc71 [MC/DWARF] Generate multiple .debug_line entries for adjacent .loc directives
The compiler occasionally generates multiple .loc directives in a row
(at the same instruction address).  These need to be transformed into
multple actual .debug_line table entries, since they are used to signal
certain information to the debugger (e.g. if the opening brace of a
function body is on the same line as the declaration).

The MCAsmStreamer version of EmitDwarfLocDirective handles this
correctly by emitting a .loc directive every time it is called.
However, the MCObjectStream version simply defaults to recording
the information and emitting only a single table entry later,
e.g. when EmitInstruction is called.

This patch introduces a MCAsmStreamer::EmitDwarfLocDirective
version that emits a line table entry for a .loc directive
that may already be pending before recording the new directive.
(This is similar to how this is handled in GNU as.)

With this patch (and the code alignment factor patch) applied,
I'm now getting identical DWARF .debug sections for all test-suite
object files on PowerPC for the internal and the external assembler.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184357 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-19 21:27:27 +00:00
..
abs.s
alias-reloc.s Don't hide the first ELF symbol. 2013-06-05 20:33:54 +00:00
alias.s Don't hide the first ELF symbol. 2013-06-05 20:33:54 +00:00
align-bss.s
align-nops.s
align-size.s
align-text.s
align.s
bad-section.s
basic-elf-32.s Change how we iterate over relocations on ELF. 2013-05-30 03:05:14 +00:00
basic-elf-64.s Change how we iterate over relocations on ELF. 2013-05-30 03:05:14 +00:00
bracket-exprs.s
bracket.s
bss.ll
call-abs.s
cfi-adjust-cfa-offset.s Change how we iterate over relocations on ELF. 2013-05-30 03:05:14 +00:00
cfi-advance-loc2.s Change how we iterate over relocations on ELF. 2013-05-30 03:05:14 +00:00
cfi-def-cfa-offset.s Change how we iterate over relocations on ELF. 2013-05-30 03:05:14 +00:00
cfi-def-cfa-register.s Change how we iterate over relocations on ELF. 2013-05-30 03:05:14 +00:00
cfi-def-cfa.s Change how we iterate over relocations on ELF. 2013-05-30 03:05:14 +00:00
cfi-escape.s Change how we iterate over relocations on ELF. 2013-05-30 03:05:14 +00:00
cfi-offset.s Change how we iterate over relocations on ELF. 2013-05-30 03:05:14 +00:00
cfi-reg.s
cfi-register.s Change how we iterate over relocations on ELF. 2013-05-30 03:05:14 +00:00
cfi-rel-offset2.s Change how we iterate over relocations on ELF. 2013-05-30 03:05:14 +00:00
cfi-rel-offset.s Change how we iterate over relocations on ELF. 2013-05-30 03:05:14 +00:00
cfi-remember.s Change how we iterate over relocations on ELF. 2013-05-30 03:05:14 +00:00
cfi-restore.s Change how we iterate over relocations on ELF. 2013-05-30 03:05:14 +00:00
cfi-same-value.s Change how we iterate over relocations on ELF. 2013-05-30 03:05:14 +00:00
cfi-sections.s
cfi-signal-frame.s
cfi-undefined.s Change how we iterate over relocations on ELF. 2013-05-30 03:05:14 +00:00
cfi-zero-addr-delta.s Change how we iterate over relocations on ELF. 2013-05-30 03:05:14 +00:00
cfi.s Change how we iterate over relocations on ELF. 2013-05-30 03:05:14 +00:00
comdat.s
common2.s
common.s
comp-dir.s
debug-line2.s [MC/DWARF] Generate multiple .debug_line entries for adjacent .loc directives 2013-06-19 21:27:27 +00:00
debug-line.s
debug-loc.s
diff2.s
diff.s
elf_directive_previous.s
elf_directive_section.s
empty-dwarf-lines.s
empty.s
entsize.ll
entsize.s
fde.s
file.s
gen-dwarf.s Change how we iterate over relocations on ELF. 2013-05-30 03:05:14 +00:00
global-offset.s
got.s Change how we iterate over relocations on ELF. 2013-05-30 03:05:14 +00:00
ident.s
invalid-symver.s
lcomm.s
leb128.s
lit.local.cfg
local-reloc.s Change how we iterate over relocations on ELF. 2013-05-30 03:05:14 +00:00
many-section.s
many-sections-2.s
merge.s Change how we iterate over relocations on ELF. 2013-05-30 03:05:14 +00:00
n_bytes.s
no-fixup.s
noexec.s
norelocation.s
org.s
pic-diff.s
plt.s
pr9292.s
relax-all-flag.s
relax-arith.s
relax-crash.s
relax.s
relocation-386.s Change how we iterate over relocations on ELF. 2013-05-30 03:05:14 +00:00
relocation-pc.s Change how we iterate over relocations on ELF. 2013-05-30 03:05:14 +00:00
relocation.s Change how we iterate over relocations on ELF. 2013-05-30 03:05:14 +00:00
rename.s Change how we iterate over relocations on ELF. 2013-05-30 03:05:14 +00:00
section-quoting.s
section.s
set.s
sleb.s
subsection.s
symref.s Change how we iterate over relocations on ELF. 2013-05-30 03:05:14 +00:00
tls-i386.s
tls.s
type.s
uleb.s
undef2.s
undef.s
version.s
weak-relocation.s Change how we iterate over relocations on ELF. 2013-05-30 03:05:14 +00:00
weak.s
weakref-plt.s
weakref-reloc.s
weakref.s Don't hide the first ELF symbol. 2013-06-05 20:33:54 +00:00
x86_64-reloc-sizetest.s Change how we iterate over relocations on ELF. 2013-05-30 03:05:14 +00:00
zero.s