summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
diff options
context:
space:
mode:
authorAdrian Prantl <aprantl@apple.com>2017-08-02 17:07:38 +0000
committerAdrian Prantl <aprantl@apple.com>2017-08-02 17:07:38 +0000
commit5577363a2c4e1b3c3e7f725c72017ed7e16870cf (patch)
tree74c8feb3db7acf7ea21339585d427c0327d32370 /llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
parente44032f7e7ac2827dcc4ea1474fa0fc30fc5c505 (diff)
downloadbcm5719-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/DwarfCompileUnit.cpp')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp8
1 files changed, 2 insertions, 6 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.
OpenPOWER on IntegriCloud