diff options
| author | Adrian Prantl <aprantl@apple.com> | 2017-08-02 17:07:38 +0000 |
|---|---|---|
| committer | Adrian Prantl <aprantl@apple.com> | 2017-08-02 17:07:38 +0000 |
| commit | 5577363a2c4e1b3c3e7f725c72017ed7e16870cf (patch) | |
| tree | 74c8feb3db7acf7ea21339585d427c0327d32370 /llvm/lib/CodeGen/AsmPrinter | |
| parent | e44032f7e7ac2827dcc4ea1474fa0fc30fc5c505 (diff) | |
| download | bcm5719-llvm-5577363a2c4e1b3c3e7f725c72017ed7e16870cf.tar.gz bcm5719-llvm-5577363a2c4e1b3c3e7f725c72017ed7e16870cf.zip | |
Remove the unused Offset field from MachineLocation (NFC)
rdar://problem/33580047
llvm-svn: 309831
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter')
| -rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp | 8 | ||||
| -rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp | 6 |
2 files changed, 3 insertions, 11 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp index 6c5aa966786..8820d21dd14 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp @@ -483,12 +483,8 @@ DIE *DwarfCompileUnit::constructVariableDIEImpl(const DbgVariable &DV, if (DVInsn->getOperand(0).isReg()) { const MachineOperand RegOp = DVInsn->getOperand(0); // If the second operand is an immediate, this is an indirect value. - if (DVInsn->getOperand(1).isImm()) { - MachineLocation Location(RegOp.getReg(), - DVInsn->getOperand(1).getImm()); - addVariableAddress(DV, *VariableDie, Location); - } else if (RegOp.getReg()) - addVariableAddress(DV, *VariableDie, MachineLocation(RegOp.getReg())); + MachineLocation Location(RegOp.getReg(), DVInsn->getOperand(1).isImm()); + addVariableAddress(DV, *VariableDie, Location); } else if (DVInsn->getOperand(0).isImm()) { // This variable is described by a single constant. // Check whether it has a DIExpression. diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp index 6e9afde0f28..b4bd470fe85 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp @@ -831,13 +831,9 @@ static DebugLocEntry::Value getDebugLocValue(const MachineInstr *MI) { assert(MI->getNumOperands() == 4); if (MI->getOperand(0).isReg()) { - MachineLocation MLoc; // If the second operand is an immediate, this is a // register-indirect address. - if (!MI->getOperand(1).isImm()) - MLoc.set(MI->getOperand(0).getReg()); - else - MLoc.set(MI->getOperand(0).getReg(), MI->getOperand(1).getImm()); + MachineLocation MLoc(MI->getOperand(0).getReg(), MI->getOperand(1).isImm()); return DebugLocEntry::Value(Expr, MLoc); } if (MI->getOperand(0).isImm()) |

