diff options
Diffstat (limited to 'llvm/lib/Transforms')
| -rw-r--r-- | llvm/lib/Transforms/Utils/Local.cpp | 9 | 
1 files changed, 2 insertions, 7 deletions
| diff --git a/llvm/lib/Transforms/Utils/Local.cpp b/llvm/lib/Transforms/Utils/Local.cpp index b6d555cd13e..8e501728599 100644 --- a/llvm/lib/Transforms/Utils/Local.cpp +++ b/llvm/lib/Transforms/Utils/Local.cpp @@ -1599,13 +1599,8 @@ static void replaceOneDbgValueForAlloca(DbgValueInst *DVI, Value *NewAddress,    // Insert the offset before the first deref.    // We could just change the offset argument of dbg.value, but it's unsigned... -  if (Offset) { -    SmallVector<uint64_t, 4> Ops; -    DIExpression::appendOffset(Ops, Offset); -    Ops.append(DIExpr->elements_begin() + 1, DIExpr->elements_end()); -    Ops.push_back(dwarf::DW_OP_deref); -    DIExpr = Builder.createExpression(Ops); -  } +  if (Offset) +    DIExpr = DIExpression::prepend(DIExpr, 0, Offset);    Builder.insertDbgValueIntrinsic(NewAddress, DIVar, DIExpr, Loc, DVI);    DVI->eraseFromParent(); | 

