[PATCH] Linker: Replace overridden subprograms

Duncan P. N. Exon Smith dexonsmith at apple.com
Mon Dec 15 22:20:46 PST 2014


When a function gets replaced by `ModuleLinker`, ensure that the "first"
subprogram pointing to it is updated to be the *same* subprogram pointed
to by the `!dbg` references in that function.  That means it should come
from the "first" subprogram in a linked-in compile unit.

This is a stop-gap "fix" for PR21910.  Ideally we wouldn't have two
different subprograms around, but it's not easy to fix that.  In the
meantime, this fixes bootstraps that hit assertions in
`LexicalScopes::initialize()` due to the explicit instantiations in
`lib/IR/Dominators.cpp` eventually getting replaced by -argpromotion.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Linker-Replace-overridden-subprograms.patch
Type: application/octet-stream
Size: 10526 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20141215/1957135e/attachment.obj>


More information about the llvm-commits mailing list