[DebugInfo] Have the verifier accept missing linkage names.
authorJonas Devlieghere <jonas@devlieghere.com>
Mon, 3 Sep 2018 12:12:17 +0000 (12:12 +0000)
committerJonas Devlieghere <jonas@devlieghere.com>
Mon, 3 Sep 2018 12:12:17 +0000 (12:12 +0000)
commit6e5c7e6037a43c42efa9d3a2af2704322f704824
tree17b661586108f464504d81af9d161b34ccfeb9aa
parent5c984fb16d7d27c3522cf7eeb1b1805e867af499
[DebugInfo] Have the verifier accept missing linkage names.

According to the standard, for the .debug_names (the "dwarf accelerator
tables"):

> If a subprogram or inlined subroutine is included, and has a
> DW_AT_linkage_name attribute, there will be an additional index entry
> for the linkage name.

For Swift we generate DW_structure_types with a linkage name and the
verifier was incorrectly rejecting this. This patch fixes that by only
considering the linkage name in those particular cases. The test is the
"reduced" debug info of the failing swift test on swift.org.

Differential revision: https://reviews.llvm.org/D51420

llvm-svn: 341311
llvm/lib/DebugInfo/DWARF/DWARFVerifier.cpp
llvm/test/tools/llvm-dwarfdump/X86/verify_no_linkage_name.s [new file with mode: 0644]