forked from OSchip/llvm-project
Replaced two instances of std::function with auto.
Thanks to Zachary Turner for the suggestion. It's distasteful that the actual type of the lambda can't be spelled out, but it should be evident from the definition of the lambda body. llvm-svn: 281536
This commit is contained in:
parent
1b9fc8ed65
commit
aa4b44c662
|
@ -3335,10 +3335,9 @@ bool DWARFExpression::MatchesOperand(StackFrame &frame,
|
|||
return false;
|
||||
}
|
||||
|
||||
std::function<bool(const Instruction::Operand &)> recurse =
|
||||
[&frame, fb_expr](const Instruction::Operand &child) {
|
||||
return fb_expr->MatchesOperand(frame, child);
|
||||
};
|
||||
auto recurse = [&frame, fb_expr](const Instruction::Operand &child) {
|
||||
return fb_expr->MatchesOperand(frame, child);
|
||||
};
|
||||
|
||||
if (!offset &&
|
||||
MatchUnaryOp(MatchOpType(Instruction::Operand::Type::Dereference),
|
||||
|
|
|
@ -1608,10 +1608,9 @@ lldb::ValueObjectSP DoGuessValueAt(StackFrame &frame, ConstString reg,
|
|||
}
|
||||
|
||||
Instruction::Operand *origin_operand = nullptr;
|
||||
std::function<bool(const Instruction::Operand &)> clobbered_reg_matcher =
|
||||
[reg_info](const Instruction::Operand &op) {
|
||||
return MatchRegOp(*reg_info)(op) && op.m_clobbered;
|
||||
};
|
||||
auto clobbered_reg_matcher = [reg_info](const Instruction::Operand &op) {
|
||||
return MatchRegOp(*reg_info)(op) && op.m_clobbered;
|
||||
};
|
||||
|
||||
if (clobbered_reg_matcher(operands[0])) {
|
||||
origin_operand = &operands[1];
|
||||
|
|
Loading…
Reference in New Issue