summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp6
1 files changed, 1 insertions, 5 deletions
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())
OpenPOWER on IntegriCloud