[PATCH] D27320: [DWARF] Put linkage-name on abstract origin even when there's a declaration

Paul Robinson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 1 13:41:26 PST 2016


probinson created this revision.
probinson added reviewers: dblaikie, echristo, aprantl.
probinson added a subscriber: llvm-commits.
Herald added a subscriber: mehdi_amini.

In r266692, we made it possible to emit linkage-names only for inlined subroutines, putting the attribute
on the abstract origin DIE (which counts as the definition DIE).  However, this fails when we emit a 
declaration DIE prior to the definition DIE, because (a) when we process the declaration, we don't emit
the linkage name, because it's not an abstract origin; and (b) when we process the definition, we look at
the declaration metadata and see it has a linkage name, so we think it has already been emitted.

Look at the actual DIE, rather than the metadata, to see whether we've already emitted the linkage name.


https://reviews.llvm.org/D27320

Files:
  lib/CodeGen/AsmPrinter/DwarfUnit.cpp
  test/DebugInfo/Generic/linkage-name-abstract.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D27320.79977.patch
Type: text/x-patch
Size: 11223 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161201/0e24f033/attachment.bin>


More information about the llvm-commits mailing list