DebugInfo: Omit is_stmt from line table entries on the same line.
authorDavid Blaikie <dblaikie@gmail.com>
Tue, 30 Dec 2014 22:47:13 +0000 (22:47 +0000)
committerDavid Blaikie <dblaikie@gmail.com>
Tue, 30 Dec 2014 22:47:13 +0000 (22:47 +0000)
commit1d68fc5021ca8c704e21f171d98bb18eb396a7fa
tree4808e591d1da72ba86b0b4907b49671bd14d73ba
parenta7940ef0e4566ea1f9148c30eb90aeb4026c0ce5
DebugInfo: Omit is_stmt from line table entries on the same line.

GCC does this for non-zero discriminators and since GCC doesn't produce
column info, that was the only place it comes up there. For LLVM, since
we can emit discriminators and/or column info, it makes more sense to
invert the condition and just test for changes in line number.

This should resolve at least some of the GDB 7.5 test suite failures
created by recent Clang changes that increase the location fidelity
(which, since Clang defaults to including column info on Linux by
default created a bunch of cases that confused GDB).

In theory we could do this better/differently by grouping actual source
statements together in a similar manner to the way lexical scopes are
handled but given that GDB isn't really in a position to consume that (&
users are probably somewhat used to different lines being different
'statements') this seems the safest and cheapest change. (I'm concerned
that doing this 'right' would bloat the debugloc data even further -
something Duncan's working hard to address)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225011 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/AsmPrinter/DwarfDebug.cpp
lib/MC/MCAsmStreamer.cpp
test/DebugInfo/X86/discriminator.ll
test/DebugInfo/multiline.ll [new file with mode: 0644]