Inliner: Use replaceDbgDeclareForAlloca() instead of splicing the

instruction and generalize it to optionally dereference the variable.
Follow-up to r227544.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227604 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Adrian Prantl
2015-01-30 19:37:48 +00:00
parent 7a3c3f3a96
commit 88deac4007
6 changed files with 27 additions and 24 deletions

View File

@@ -274,10 +274,11 @@ bool LowerDbgDeclare(Function &F);
/// an alloca, if any.
DbgDeclareInst *FindAllocaDbgDeclare(Value *V);
/// replaceDbgDeclareForAlloca - Replaces llvm.dbg.declare instruction when
/// alloca is replaced with a new value.
/// \brief Replaces llvm.dbg.declare instruction when an alloca is replaced with
/// a new value. If Deref is true, tan additional DW_OP_deref is prepended to
/// the expression.
bool replaceDbgDeclareForAlloca(AllocaInst *AI, Value *NewAllocaAddress,
DIBuilder &Builder);
DIBuilder &Builder, bool Deref);
/// \brief Remove all blocks that can not be reached from the function's entry.
///