diff options
| author | Paul Robinson <paul.robinson@sony.com> | 2016-12-02 01:55:17 +0000 |
|---|---|---|
| committer | Paul Robinson <paul.robinson@sony.com> | 2016-12-02 01:55:17 +0000 |
| commit | dad4907bc1da738d4fef02786974288e9822cb0f (patch) | |
| tree | c627595e4322faba15cc3e308d7e53d8c7864ff2 /llvm/lib/CodeGen | |
| parent | 444e6f3d8203f197b430d4b649f0981ec1653085 (diff) | |
| download | bcm5719-llvm-dad4907bc1da738d4fef02786974288e9822cb0f.tar.gz bcm5719-llvm-dad4907bc1da738d4fef02786974288e9822cb0f.zip | |
[DWARF] Put linkage-name on abstract origin even when there's a declaration.
In r266692, we made it possible to emit linkage names for just inlined
functions, putting the attribute on the abstract origin. Make sure we
don't think the linkage-name was already emitted on a declaration.
Differential Revision: http://reviews.llvm.org/D27320
llvm-svn: 288450
Diffstat (limited to 'llvm/lib/CodeGen')
| -rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp index 1923d038f73..b6b72b95bff 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp @@ -1150,7 +1150,9 @@ bool DwarfUnit::applySubprogramDefinitionAttributes(const DISubprogram *SP, assert(DeclDie && "This DIE should've already been constructed when the " "definition DIE was created in " "getOrCreateSubprogramDIE"); - DeclLinkageName = SPDecl->getLinkageName(); + // Look at the Decl's linkage name only if we emitted it. + if (DD->useAllLinkageNames()) + DeclLinkageName = SPDecl->getLinkageName(); unsigned DeclID = getOrCreateSourceID(SPDecl->getFilename(), SPDecl->getDirectory()); unsigned DefID = getOrCreateSourceID(SP->getFilename(), SP->getDirectory()); |

