]> granicus.if.org Git - llvm/commit
Reapply "Linker: Drop superseded subprograms"
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>
Thu, 18 Dec 2014 01:05:33 +0000 (01:05 +0000)
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>
Thu, 18 Dec 2014 01:05:33 +0000 (01:05 +0000)
commitee40b16641de1e8800c46763836e173cd7c54e7e
treebac5d49644fb7e9ee168f7388092e20be92730ed
parent1e6990e4dcc4ce10770774a182af1d4836637df6
Reapply "Linker: Drop superseded subprograms"

This reverts commit r224416, reapplying r224389.  The buildbots hadn't
recovered after my revert, waiting until David reverted a couple of his
commits.  It looks like it was just bad timing (where we were both
modifying code related to the same assertion).  Trying again...

Here's the original text:

    When a function gets replaced by `ModuleLinker`, drop superseded
    subprograms.  This ensures that the "first" subprogram pointing at a
    function is the same one that `!dbg` references point at.

    This is a stop-gap fix for PR21910.  Notably, this fixes Release+Asserts
    bootstraps that are currently asserting out in
    `LexicalScopes::initialize()` due to the explicit instantiations in
    `lib/IR/Dominators.cpp` eventually getting replaced by -argpromotion.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224487 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Linker/LinkModules.cpp
test/Linker/Inputs/replaced-function-matches-first-subprogram.ll [new file with mode: 0644]
test/Linker/replaced-function-matches-first-subprogram.ll [new file with mode: 0644]