if (isLocation()) {
llvm::dbgs() << "Loc = { reg=" << Loc.getReg() << " ";
if (Loc.isIndirect())
- llvm::dbgs() << '+' << Loc.getOffset();
+ llvm::dbgs() << "+0";
llvm::dbgs() << "} ";
}
else if (isConstantInt())
if (Location.isIndirect())
DwarfExpr.setMemoryLocationKind();
- SmallVector<uint64_t, 8> Ops;
- if (Location.isIndirect() && Location.getOffset()) {
- Ops.push_back(dwarf::DW_OP_plus_uconst);
- Ops.push_back(Location.getOffset());
- }
- DIExpressionCursor Cursor(Ops);
+ DIExpressionCursor Cursor({});
const TargetRegisterInfo &TRI = *Asm->MF->getSubtarget().getRegisterInfo();
if (!DwarfExpr.addMachineRegExpression(TRI, Cursor, Location.getReg()))
return;
if (Location.isIndirect())
DwarfExpr.setMemoryLocationKind();
- SmallVector<uint64_t, 8> Ops;
- if (Location.isIndirect() && Location.getOffset()) {
- Ops.push_back(dwarf::DW_OP_plus_uconst);
- Ops.push_back(Location.getOffset());
- }
- Ops.append(DIExpr->elements_begin(), DIExpr->elements_end());
- DIExpressionCursor Cursor(Ops);
+ DIExpressionCursor Cursor(DIExpr);
const TargetRegisterInfo &TRI = *Asm->MF->getSubtarget().getRegisterInfo();
if (!DwarfExpr.addMachineRegExpression(TRI, Cursor, Location.getReg()))
return;
MachineLocation Location = Value.getLoc();
if (Location.isIndirect())
DwarfExpr.setMemoryLocationKind();
- SmallVector<uint64_t, 8> Ops;
- if (Location.isIndirect() && Location.getOffset()) {
- Ops.push_back(dwarf::DW_OP_plus_uconst);
- Ops.push_back(Location.getOffset());
- }
- Ops.append(DIExpr->elements_begin(), DIExpr->elements_end());
- DIExpressionCursor Cursor(Ops);
+ DIExpressionCursor Cursor(DIExpr);
const TargetRegisterInfo &TRI = *AP.MF->getSubtarget().getRegisterInfo();
if (!DwarfExpr.addMachineRegExpression(TRI, Cursor, Location.getReg()))
return;
if (Location.isIndirect())
DwarfExpr.setMemoryLocationKind();
- SmallVector<uint64_t, 9> Ops;
- if (Location.isIndirect() && Location.getOffset()) {
- Ops.push_back(dwarf::DW_OP_plus_uconst);
- Ops.push_back(Location.getOffset());
- }
+ SmallVector<uint64_t, 6> Ops;
// If we started with a pointer to the __Block_byref... struct, then
// the first thing we need to do is dereference the pointer (DW_OP_deref).
if (isPointer)