diff options
Diffstat (limited to 'llvm/lib/CodeGen/LiveDebugValues/VarLocBasedImpl.cpp')
-rw-r--r-- | llvm/lib/CodeGen/LiveDebugValues/VarLocBasedImpl.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/LiveDebugValues/VarLocBasedImpl.cpp b/llvm/lib/CodeGen/LiveDebugValues/VarLocBasedImpl.cpp index 94e7f1b..f7150f9 100644 --- a/llvm/lib/CodeGen/LiveDebugValues/VarLocBasedImpl.cpp +++ b/llvm/lib/CodeGen/LiveDebugValues/VarLocBasedImpl.cpp @@ -1359,10 +1359,9 @@ void VarLocBasedLDV::removeEntryValue(const MachineInstr &MI, return; // Try to get non-debug instruction responsible for the DBG_VALUE. - const MachineInstr *TransferInst = nullptr; Register Reg = MI.getDebugOperand(0).getReg(); - if (Reg.isValid() && RegSetInstrs.contains(Reg)) - TransferInst = RegSetInstrs.find(Reg)->second; + const MachineInstr *TransferInst = + Reg.isValid() ? RegSetInstrs.lookup(Reg) : nullptr; // Case of the parameter's DBG_VALUE at the start of entry MBB. if (!TransferInst && !LastNonDbgMI && MI.getParent()->isEntryBlock()) |