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
Showing
- llvm/include/llvm/DebugInfo.h 2 additions, 0 deletionsllvm/include/llvm/DebugInfo.h
- llvm/lib/Transforms/IPO/DeadArgumentElimination.cpp 50 additions, 0 deletionsllvm/lib/Transforms/IPO/DeadArgumentElimination.cpp
- llvm/lib/VMCore/DebugInfo.cpp 10 additions, 0 deletionsllvm/lib/VMCore/DebugInfo.cpp
- llvm/test/Transforms/DeadArgElim/dbginfo.ll 64 additions, 0 deletionsllvm/test/Transforms/DeadArgElim/dbginfo.ll
Loading
Please register or sign in to comment