Fix PR14016.
authorAlexey Samsonov <samsonov@google.com>
Tue, 9 Oct 2012 08:13:15 +0000 (08:13 +0000)
committerAlexey Samsonov <samsonov@google.com>
Tue, 9 Oct 2012 08:13:15 +0000 (08:13 +0000)
commite97a3a4b4fccbe6283b616af93ab0117d3a7fee9
treeafe233298f0be8fd15476c640cc05e3c131a0c85
parent6765834754cbb3cb0f15b4b15e98c5e73fa50066
Fix PR14016.
DeadArgumentElimination pass can replace one LLVM function with another,
invalidating a pointer stored in debug info metadata entry for this function.
To fix this, we collect debug info descriptors for functions before
running a DeadArgumentElimination pass and "patch" pointers in metadata nodes
if we replace a function.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165490 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/DebugInfo.h
lib/Transforms/IPO/DeadArgumentElimination.cpp
lib/VMCore/DebugInfo.cpp
test/Transforms/DeadArgElim/dbginfo.ll [new file with mode: 0644]