diff options
author | Petar Jovanovic <petar.jovanovic@mips.com> | 2019-05-20 10:35:57 +0000 |
---|---|---|
committer | Petar Jovanovic <petar.jovanovic@mips.com> | 2019-05-20 10:35:57 +0000 |
commit | e85bbf564de9adfe09d6b24b9861b28e2b78e9ad (patch) | |
tree | cc314d08294ee5d04bb3f4609743a1ea43823433 /llvm/lib/CodeGen/PrologEpilogInserter.cpp | |
parent | 96c5929926f62dcfa887f15d43094ed42df8b914 (diff) | |
download | bcm5719-llvm-e85bbf564de9adfe09d6b24b9861b28e2b78e9ad.tar.gz bcm5719-llvm-e85bbf564de9adfe09d6b24b9861b28e2b78e9ad.zip |
[DebugInfoMetadata] Refactor DIExpression::prepend constants (NFC)
Refactor DIExpression::With* into a flag enum in order to be less
error-prone to use (as discussed on D60866).
Patch by Djordje Todorovic.
Differential Revision: https://reviews.llvm.org/D61943
llvm-svn: 361137
Diffstat (limited to 'llvm/lib/CodeGen/PrologEpilogInserter.cpp')
-rw-r--r-- | llvm/lib/CodeGen/PrologEpilogInserter.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/PrologEpilogInserter.cpp b/llvm/lib/CodeGen/PrologEpilogInserter.cpp index 55925c8cf45..ab6814be694 100644 --- a/llvm/lib/CodeGen/PrologEpilogInserter.cpp +++ b/llvm/lib/CodeGen/PrologEpilogInserter.cpp @@ -1187,11 +1187,13 @@ void PEI::replaceFrameIndices(MachineBasicBlock *BB, MachineFunction &MF, // to be direct. if (MI.isIndirectDebugValue() && DIExpr->isImplicit()) { SmallVector<uint64_t, 2> Ops = {dwarf::DW_OP_deref_size, Size}; - DIExpr = DIExpression::prependOpcodes(DIExpr, Ops, DIExpression::WithStackValue); + bool WithStackValue = true; + DIExpr = DIExpression::prependOpcodes(DIExpr, Ops, WithStackValue); // Make the DBG_VALUE direct. MI.getOperand(1).ChangeToRegister(0, false); } - DIExpr = DIExpression::prepend(DIExpr, DIExpression::NoDeref, Offset); + DIExpr = + DIExpression::prepend(DIExpr, DIExpression::ApplyOffset, Offset); MI.getOperand(3).setMetadata(DIExpr); continue; } |