Linker: Rewrite dwarfdump checks from r233164
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>
Wed, 25 Mar 2015 19:57:42 +0000 (19:57 +0000)
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>
Wed, 25 Mar 2015 19:57:42 +0000 (19:57 +0000)
commit151bc36220226a8098124a6af20cab22b131a30d
treeb202c49ffb7164f506ac53dd3d3a2da13c022967
parent1ab309435ad4b5c32e3a13636d348d4d8f860c5b
Linker: Rewrite dwarfdump checks from r233164

Rewrite the checks from r233164 that I temporarily disabled in r233165.

It turns out that the line-tables only debug info we emit from `llc` is
(intentionally) different on Linux than on Darwin.  r218129 started
skipping emission of subprograms with no inlined subroutines, and
r218702 was a spiritual revert of that behaviour for Darwin.

I think we can still test this in a platform-neutral way.

  - Stop checking for the possibly missing `DW_TAG_subprogram` defining
    the debug info for the real version of `@foo`.
  - Start checking the line tables, ensuring that the right debug info
    was used to generate them (grabbing `DW_AT_low_pc` from the compile
    unit).
  - I changed up the line numbers used in the "weak" version so it's
    easier to follow.

This should hopefully finish off PR22792.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233207 91177308-0d34-0410-b5e6-96231b3b80d8
test/Linker/Inputs/subprogram-linkonce-weak.ll
test/Linker/subprogram-linkonce-weak.ll