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)
commit3b861ec9898150947d023c6288c9a6e170df8ef3
tree5c11e2d23b6cd1b71d56a55a09d1dc2f2ee3e31c
parent0597c1e53cc9e773eff07746df271cd035cc5bd2
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.

llvm-svn: 165490
llvm/include/llvm/DebugInfo.h
llvm/lib/Transforms/IPO/DeadArgumentElimination.cpp
llvm/lib/VMCore/DebugInfo.cpp
llvm/test/Transforms/DeadArgElim/dbginfo.ll [new file with mode: 0644]