diff options
author | Adrian Prantl <aprantl@apple.com> | 2017-04-19 23:42:25 +0000 |
---|---|---|
committer | Adrian Prantl <aprantl@apple.com> | 2017-04-19 23:42:25 +0000 |
commit | c12cee36004590e735fad8d59203ed1a37b72349 (patch) | |
tree | 78e78e9c45d454fcc00a3164d595689824799312 /llvm/lib/CodeGen/AsmPrinter/DwarfExpression.cpp | |
parent | 295c952b67900e68960bf0be6c29d1393d6916dd (diff) | |
download | bcm5719-llvm-c12cee36004590e735fad8d59203ed1a37b72349.tar.gz bcm5719-llvm-c12cee36004590e735fad8d59203ed1a37b72349.zip |
Fix bug that caused DwarfExpression to drop DW_OP_deref from FI locations
- introduced in r300522 and found via the Swift LLDB testsuite.
The fix is to set the location kind to memory whenever an FrameIndex
location is emitted.
rdar://problem/31707602
llvm-svn: 300793
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/DwarfExpression.cpp')
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/DwarfExpression.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfExpression.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfExpression.cpp index d21288f4b81..55397c3ac09 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfExpression.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfExpression.cpp @@ -193,14 +193,10 @@ void DwarfExpression::addUnsignedConstant(const APInt &Value) { } } -bool DwarfExpression::addMachineLocExpression(const TargetRegisterInfo &TRI, +bool DwarfExpression::addMachineRegExpression(const TargetRegisterInfo &TRI, DIExpressionCursor &ExprCursor, - MachineLocation Loc, + unsigned MachineReg, unsigned FragmentOffsetInBits) { - if (Loc.isIndirect()) - LocationKind = Memory; - - unsigned MachineReg = Loc.getReg(); auto Fragment = ExprCursor.getFragmentInfo(); if (!addMachineReg(TRI, MachineReg, Fragment ? Fragment->SizeInBits : ~1U)) return false; |